* Backup & restore FH Settings Plugin

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
Post Reply
avatar
ColinMc
Superstar
Posts: 458
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Backup & restore FH Settings Plugin

Post by ColinMc »

I'm using v3.0, and tonight having made some changes to my FH settings I ran the plug-in, and I noticed that the Backup Folder had changed from what I had set it to.

My initial backup using the Plugin is to an External disk (not the disk I reported a crash problem to CP earlier this week).
Backup & Restore.jpg
Backup & Restore.jpg (35.88 KiB) Viewed 2579 times
My Project data backups are also sent to this disk.

The plugin is set to use F:\FH Backup\System as the Backup directory. Most times this works as expected. However, tonight, it displayed

F:\FH Backup\Projects
Backup & Restore 2.jpg
Backup & Restore 2.jpg (115.62 KiB) Viewed 2579 times
I reset it to use the correct folder but it changed it again after running the plugin.

I repeated the exercise twice more using Snagit to capture video of the event. both times it did not change the Backup directory. The third time however, the video quite clearly shows the plugin opening with the correct Backup directory showing, before clearly showing it changing to the wrong one, without user intervention. I can't paste this here, but I can send a copy if it helps.

As far as I can see, I did nothing different the three extra times I ran the plug-in. (I manually added a time to the dated folder after the backup had completed to avoid overwriting issues). So I have no clue as to what is different to cause the change in directory.
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families
User avatar
BillH
Megastar
Posts: 2245
Joined: 31 May 2010 03:40
Family Historian: V7
Location: Washington State, USA

Re: Backup & restore FH Settings Plugin

Post by BillH »

Colin,

Is this the first time you have backed up your settings since updating from FH 6 to FH 7? I noticed after I updated that the backup folder in the plugin was changed from the folder I had used in FH 6 to hold my settings backups to the folder which the project backups go into. However, I was able to change it in the plugin back to where I keep the settings backups and that change has stuck (it has not reverted to the project backup folder).

For your video, another option would be to upload it to a site like mediafire.com and put a link to it in a posting here.

Bill
avatar
ColinMc
Superstar
Posts: 458
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Backup & restore FH Settings Plugin

Post by ColinMc »

Is this the first time you have backed up your settings since updating from FH 6 to FH 7?
Afraid not, it looks like I still have 8 copies of Settings backed up since V7 was launched.

I've never used Mediafire, so I hope this link works. Thanks. https://www.mediafire.com/file/wpl4i3tx ... 3.mp4/file

Colin
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Backup & restore FH Settings Plugin

Post by tatewise »

The fact that the Plugin often behaves as expected but sometimes changes folder suggests some external forces at work.
Your screenshot shows that it successfully created the dated subfolders at least 3 times yesterday evening.
(That Mediafire link worked perfectly.)

Initially, the Plugin uses your preferred backup folder F:\FH Backup\System and checks it for write access.
But if that is not successful it substitutes your Tools > Preferences > Backup folder F:\FH Backup\Projects.
If that does not exist it substitutes your Project's Public folder.
In other words, the Plugin tries hard to find a useable folder rather than pester you with dialogues.

Is it possible that some other utility might lock the F:\FH Backup\System folder against write access just when you happen to be running the Plugin?

BTW: Have you tried shrinking the size of that Plugin window as it is much larger than it needs to be.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
ColinMc
Superstar
Posts: 458
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Backup & restore FH Settings Plugin

Post by ColinMc »

Initially, the Plugin uses your chosen backup folder F:\FH Backup\System and checks it for write access.
But if that is not successful it substitutes your Tools > Preferences > Backup folder F:\FH Backup\Projects.
That is very helpful to know.

I can't think of anything that might affect it (is was run so soon after the previous run), and the disk was obviously available as the "projects" folder was viewable.

However there sometimes can be a delay in accessing an external disc so that may explain it, and the second one (you can see the time lapse in the video) becomes available in that period.

Quite happy to keep an eye on it as it is doing what you planned it to do, which makes perfect sense. As long as its putting it somewhere safe , I can't pretend I'm over bothered about it. I can find it if I need it.
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Backup & restore FH Settings Plugin

Post by tatewise »

I was also wondering if it might be a timing issue with the access to the external disk.
The process of checking if the folder allows write access is rather more complex than you might suspect.

The simplistic technique is to try to write a file to the folder and if it succeeds delete the file and report success.
However, users complained that alters the folder Date Modified so it no longer matched its contents and confused them.

So instead the plugin runs a CMD prompt script to obtain the folder Access Control List permissions for the current user.
If that is unsuccessful it reverts to using the simplistic technique.

Maybe the timing of access to the external disk is upsetting that process somewhere, but it would be tricky to discover.

P.S.
In FH V7 the Lua File System (lfs) library has been updated to provide Access Control List permissions that were not available before, so the Plugin could be updated to use those and that may avoid the timing issues. Although, on closer inspection, it appears that the permissions are for the file/folder owner rather than the current user, but not sure.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
ColinMc
Superstar
Posts: 458
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Backup & restore FH Settings Plugin

Post by ColinMc »

so the Plugin could be updated to use those and that may avoid the timing issues
I'm sure there are more pressing needs than looking at this.

Thanks for all you do.
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families
Post Reply