Recent

Author Topic: ??? How is this possible ???  (Read 4784 times)

MarkMLl

  • Hero Member
  • *****
  • Posts: 8504
Re: ??? How is this possible ???
« Reply #15 on: October 06, 2022, 03:40:07 pm »
If it's any consolation, I know somebody who swears his parents' house is haunted because ornaments unaccountably smash themselves on the floor. He overlooks the fact that in common with many older timber houses it vibrates in the wind. And that they've got a cat.

Are you absolutely sure that you don't have any symbolic links between files or directories, mounted filesystems and so on? Does Windows have any utility that lists all open files? Do you have a virus scanner active?

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

rvk

  • Hero Member
  • *****
  • Posts: 6885
Re: ??? How is this possible ???
« Reply #16 on: October 06, 2022, 04:02:11 pm »
Looking in the Lazarus [Backup] folder, the .BAK files have a Creation date of 5/10/22 and a timestamp of 19:02 which is at least 30 minutes after I closed Lazarus, (...)
What are your backup settings in the IDE now? Because if you set the counter to infinite (like you said a few posts ago), there shouldn't be .bak files, should there?
(files would be names .pp.1 .pp.2 etc.)

Is the backup directory in the same directory as the project, and is that on a Windows NTFS drive or a network drive?
And it's an un-synced location?


J-G

  • Hero Member
  • *****
  • Posts: 966
Re: ??? How is this possible ???
« Reply #17 on: October 06, 2022, 04:03:56 pm »
If it's any consolation, I know somebody who swears his parents' house is haunted because ornaments unaccountably smash themselves on the floor. He overlooks the fact that in common with many older timber houses it vibrates in the wind. And that they've got a cat.
No consolation at all  :D  -  House is not 'Timber' - I don't have any pets   %)

Quote from: MarkMLl
Are you absolutely sure that you don't have any symbolic links between files or directories, mounted filesystems and so on?
Yes absolutely sure, I don't have anything 'out of the ordinary' as far as 'mounted filesystems' etc. and no 'symbolic links'.  I do have some of the drives on this PC 'mapped' to another PC on the network but not the drive that the source code is on.

Quote from: MarkMLl
Does Windows have any utility that lists all open files?
Yes - Task Manager - and no, it doesn't show Lazarus open.

Quote from: MarkMLl
Do you have a virus scanner active?
Yes - Avast - and I did run a scan (negative) when this wierd behaviour appeared and again on Tuesday.

'tiz a puzzlement!   %)
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

J-G

  • Hero Member
  • *****
  • Posts: 966
Re: ??? How is this possible ???
« Reply #18 on: October 06, 2022, 04:30:15 pm »
Looking in the Lazarus [Backup] folder, the .BAK files have a Creation date of 5/10/22 and a timestamp of 19:02 which is at least 30 minutes after I closed Lazarus, (...)
What are your backup settings in the IDE now? Because if you set the counter to infinite (like you said a few posts ago), there shouldn't be .bak files, should there?
(files would be names .pp.1 .pp.2 etc.)
It is still 'infinte'  -  I had to open Laz to check - because I set it to also open as [New] project I still haven't opened the 'live' project - though I have 'restored' the source files.

I think that the last backup takes   .pas.bak, .lpi.bak (etc.) as the extension and previous versions are renamed as  .pas;1,  .pas;2,  .lpi;1 ... etc.

Quote from: rvk
Is the backup directory in the same directory as the project, and is that on a Windows NTFS drive or a network drive?
And it's an un-synced location?
Yes : in the same directory
Yes : NTFS
No : not a network drive
Not 'synced'   -  not 100% sure what you are asking there.

ScreenGrab of the project directory attached.

FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

rvk

  • Hero Member
  • *****
  • Posts: 6885
Re: ??? How is this possible ???
« Reply #19 on: October 06, 2022, 04:34:00 pm »
Not 'synced'   -  not 100% sure what you are asking there.
Dropbox / OneDrive / iCloud etc.
If synced, it could also sync back when something wrong happens (and it might screw with the dates).

I closed this project yesterday afternoon and haven't opened Lazarus ever since - - -   I wanted to review some data that was set in the code for use when the data files didn't exist (first run) so - since I haven't yet fully understood how the old source had been restored - I did check the date of the 'live' source code  ----   APRIL !!!  -----  HOW?    Neither NotePad++ nor Lazarus have been opened.
What do you mean with APRIL?
I see a date 04/10/2022 there. That's oktober 4th (seeing the other dates).


MarkMLl

  • Hero Member
  • *****
  • Posts: 8504
Re: ??? How is this possible ???
« Reply #20 on: October 06, 2022, 04:37:55 pm »
Quote from: MarkMLl
Does Windows have any utility that lists all open files?
Yes - Task Manager - and no, it doesn't show Lazarus open.

Quote from: MarkMLl
Do you have a virus scanner active?
Yes - Avast - and I did run a scan (negative) when this wierd behaviour appeared and again on Tuesday.

'tiz a puzzlement!   %)

No, I said /files open/, not /programs running/. You need to look if anything is holding the files you're trying to work on open, prime suspect being your antivirus program.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

J-G

  • Hero Member
  • *****
  • Posts: 966
Re: ??? How is this possible ???
« Reply #21 on: October 06, 2022, 04:53:08 pm »
Not 'synced'   -  not 100% sure what you are asking there.
Dropbox / OneDrive / iCloud etc.
If synced, it could also sync back when something wrong happens (and it might screw with the dates).
Ah  --  absolutely NO  -  I do not allow my data anywhere near such things  :o

Quote from: rvk
I closed this project yesterday afternoon and haven't opened Lazarus ever since - - -   I wanted to review some data that was set in the code for use when the data files didn't exist (first run) so - since I haven't yet fully understood how the old source had been restored - I did check the date of the 'live' source code  ----   APRIL !!!  -----  HOW?    Neither NotePad++ nor Lazarus have been opened.
What do you mean with APRIL?
I see a date 04/10/2022 there. That's oktober 4th (seeing the other dates).
Sorry to engender confusion - I have restored the good 'live' files  - I only posted the screebGrab to show the [backup] folder.

The ScreenGrab attached here is of the [Backup] folder.
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

J-G

  • Hero Member
  • *****
  • Posts: 966
Re: ??? How is this possible ???
« Reply #22 on: October 06, 2022, 05:07:49 pm »
No, I said /files open/, not /programs running/. You need to look if anything is holding the files you're trying to work on open, prime suspect being your antivirus program.
Ooops !   :-[

Sorry Mark  - read what I thought you asked not what you asked  :-[

Not that I've come across -  and I can't see why the AV would ever even look at data files except during a [scan].

FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

rvk

  • Hero Member
  • *****
  • Posts: 6885
Re: ??? How is this possible ???
« Reply #23 on: October 06, 2022, 05:11:41 pm »
Sorry to engender confusion - I have restored the good 'live' files  - I only posted the screebGrab to show the [backup] folder.
And your saying those files from april ended up in your live folder (not only in your backup as shown here)?

I'm not aware Lazarus ever copies back any backuped files so I would also blame the virusscanner for this.

Or you have some software which automatically restores a restore point or something.

BTW. The fact that there now are files from april in your backup dir is logical because Lazarus moved the files from live to backup before saving again.
So you'll only need to look at the fact that the files from april got in there.

I also see a V1, V2 etc. What are those directories? Maybe you should clean our the complete project directory except live-files. Maybe due to some copy-paste error, files from one of those folders ended up in the lower (live) directory.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8504
Re: ??? How is this possible ???
« Reply #24 on: October 06, 2022, 05:16:06 pm »
Sorry to engender confusion - I have restored the good 'live' files  - I only posted the screebGrab to show the [backup] folder.

Obligatory xkcd: https://xkcd.com/1179/

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

J-G

  • Hero Member
  • *****
  • Posts: 966
Re: ??? How is this possible ???
« Reply #25 on: October 06, 2022, 06:51:59 pm »
And your saying those files from april ended up in your live folder (not only in your backup as shown here)?
Yes - that is what this whole thread is about
Quote from: rvk
I'm not aware Lazarus ever copies back any backuped files so I would also blame the virusscanner for this.

Or you have some software which automatically restores a restore point or something.
Absolutely not - the only software on my PC that is capbable of 'Restoring' at all is SyncBack and I've never invoked a [Resore] in ~15 years of using it - it certainly doesn't have an auto-restore feature.

! ! ! !  >:(  >:(   FOUND IT   >:(   >:(  ! ! ! !

That comment prompted me to review the SyncBack Profile and was I surprised to see that the last backup of the Lazarus Directory was at 19.02 last night !!!

I can now see exactly how this came about  :-[

I've been opening this project from  Drive W rather than Drive T and I've been working like that for some time - HOWEVER  Drive W is where the timed backup for the Lazarus directory is!    Drive T is the real 'Live' drive and that is where the April files still are :-[ :-[ :-[ :-[ 

OUCH !!

That's a lesson learned (I hope  :) )

The fact that I often had the Drive W file open during the time that SyncBack wanted access to 'backup' the Drive T file meant that SyncBack failed, and when I then saved the project there was no problem and the next time I opened it it was still 'good'.  Since I had closed Lazarus yesterday before SyncBack was scheduled to run, it was able to complete the backup normally thus overwriting the latest version  :(

The files on Drive T are now the latest current version and I think I can safely remove all of the V1 etc. folders  - in fact I can remove the whole project from Drive W, it will be backed up from Drive T at just after 7 this evening  - maybe I'll get some sleep tonight as well !  -  Sorry to have sent everyone on a wild goose chase  - and thanks for your input.

« Last Edit: October 06, 2022, 07:03:38 pm by J-G »
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

440bx

  • Hero Member
  • *****
  • Posts: 5805
Re: ??? How is this possible ???
« Reply #26 on: October 06, 2022, 06:56:25 pm »
That's a lesson learned (I hope  :) )
From what you described, the lesson I would learn is "do your own backups".  That way you know exactly what's backed up and where it's backed up and, it won't come back unless you restore it yourself.  There is definitely something positive to be said for manual labor and, doing it yourself.

FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

J-G

  • Hero Member
  • *****
  • Posts: 966
Re: ??? How is this possible ???
« Reply #27 on: October 06, 2022, 07:15:09 pm »
That's a lesson learned (I hope  :) )
From what you described, the lesson I would learn is "do your own backups".  That way you know exactly what's backed up and where it's backed up and, it won't come back unless you restore it yourself.  There is definitely something positive to be said for manual labor and, doing it yourself.
I would agree - to some extent -  I set up the profiles in SyncBack quite some time ago and it has been faultless in dealing with the task, such that I have very seldom needed to even check that it's been run  . . . .  it just does the job in the background.

When I have looked at the profiles it has shown me that I'd taken one of the PCs off the network and forgotten that it was in use as a 'backup'. Simply bringing that PC back on line, SyncBack continued to do its job as before.

To do all (10 profiles) of the backups manually would be a very onerous task, probably taking an hour or more  -  SyncBack does it in <15 minutes with no further input from me.
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

rvk

  • Hero Member
  • *****
  • Posts: 6885
Re: ??? How is this possible ???
« Reply #28 on: October 06, 2022, 07:52:58 pm »
To do all (10 profiles) of the backups manually would be a very onerous task, probably taking an hour or more  -  SyncBack does it in <15 minutes with no further input from me.
Is that an incremental backup or full backup?

In the past I used Cobian backup for my backups and it could compress the backups to .zip or .7z.
It appended date and time to filename.
That way, you can have multiple versions of backup and you can't accidentally work in the backup as you did  :D

Nowadays, I work with SVN to a local server (which backups itself with borg backup to 2 separate remote locations) and also still have an older script which zips (7z) my source-folder to the server, with preservation of several versions, once a day. No change I could accidentally take that version (because it's in 7z).

BTW. Backup is one thing... checking the backup is another. I've had customers who thought they had a backup, only to discover when they needed it, the backup hadn't been done for over two years. I always recommend to do a dummy restore (to a different location) at least once a year (and more frequent is the data is more important) by themselves or system-admin. Just 'checking' a backup-log isn't sufficient either.


MarkMLl

  • Hero Member
  • *****
  • Posts: 8504
Re: ??? How is this possible ???
« Reply #29 on: October 06, 2022, 08:00:16 pm »
Nowadays, I work with SVN to a local server (which backups itself with borg backup to 2 separate remote locations) and also still have an older script which zips (7z) my source-folder to the server, with preservation of several versions, once a day. No change I could accidentally take that version (because it's in 7z).

Yup, I second that approach. And as I've previously remarked, Subversion without http: access is actually rather lightweight.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018