Page 1 of 3
Backup/Restore FH Customisations
Posted: 11 Mar 2012 15:47
by tatewise
I have developed Jane's Plugin
Backup Family Historian Settings mainly for my own purposes, but wondered if its features would be of interest to others.
Backup Features
- It includes every folder/file from the Program Data Calico Pie folder, so even modified Standard Diagrams/Fact Sets/Reports/Text Schemes are preserved. (Jane's Plugin only includes Custom folders).
- If any file is deleted by FH from the Program Data Calico Pie folder, then on the next run the Plugin offers to delete it from the backup folder too.
- The backup file Modified and Accessed date-time stamps are now set correctly. (Jane's Plugin has them reversed).
- The Current_User and Local_Machine settings for FH in the Registry are automatically preserved in a Registry.keys file using REG EXPORT command.
- All installed versions of FH are included, e.g. I have Family Historian V4.1.3, Family Historian 5.0 Beta, and Family Historian Demo 3.0.
Restore Features
- Restore does much the same as Backup, but in the reverse direction, and each FH Program, and Program Data Files & Registry Data Keys are selected individually.
- If any file in the Program Data Calico Pie folder is newer than the file being restored from the Backup folder, then the Plugin asks what to do ~ Copy Old Backup File or Keep New Program File.
- If any file exists in the Program Data Calico Pie folder, but not in the Backup folder, then the Plugin offers to delete it from Calico Pie folder.
Other Features
- Apart from the initial Backup, the Plugin rarely copies any files. It compares each Calico Pie versus Backup file byte size & modified date, and only if they differ does it perform the copy, which means it runs much faster and is much safer to use.
- The Backup folder location is remembered per Project, so that Backup/Restore of settings can be performed (with care) on a per Project, per User, or per PC basis.
- It would be particularly useful in transferring ALL settings from an old PC to a new PC, in case Windows Easy Transfer does not do it OK.
The Plugin needs a better
User Interface with a lot of WARNINGS about using
Restore, especially for less experienced users.
Any comments??? What do you think??? Is it worth adding to the Plugin Store???
ID:6004
Backup/Restore FH Customisations
Posted: 11 Mar 2012 16:32
by RogerF
Personally, I'd hold off adding it to the store until (a) it had been trialled by several other users, and (b) you've finished the necessary polishing. But the concept is great, and I'm strongly in favour of making it available (preferably superseding Jane's version, to avoid confusion).
Backup/Restore FH Customisations
Posted: 11 Mar 2012 17:36
by BillH
Mike,
I too would be very interested in your version. I especially like the backup and restore of the registry entries.
Bill
Backup/Restore FH Customisations
Posted: 11 Mar 2012 17:53
by PeterR
This sounds very good to me too. How can we test it without adding it to the store?
Backup/Restore FH Customisations
Posted: 11 Mar 2012 18:22
by tatewise
Thank you for your positive feedback. That gives me the impetus to build the User Interface.
I am testing the Plugin in various User/Administrator accounts on PC running Windows 7 64-bit, and Windows Vista 32-bit, and Windows XP 32-bit.
When the User Interface is ready, and my testing is finished, perhaps I could post it in the Plugin Store, with caveats that the Restore feature needs to be checked by experienced users, and not used by anyone who does not understand and accept the associated risks.
Backup/Restore FH Customisations
Posted: 11 Mar 2012 20:56
by Jane
The best way to share plugins for testing once the store goes live will be to upload them in to the Knowledge base (I think you will find they can be uploaded as media). That way they can have a page there and won't confuse the store with items not quite ready for general consumption.
Backup/Restore FH Customisations
Posted: 23 Mar 2012 00:27
by tatewise
A
Beta Test Version 1.0 of my
Backup and Restore Family Historian Settings plugin is now available for download from the FHUG
Work In Progress Plugins area.
Jane - could you possibly rename this download to
Backup and Restore Family Historian Settings.fh_lua?
The media store needs to be able to cope with files that have this type of Windows filename using mixed case letters and spaces.
Please take care when using this Plugin, because it not only operates on the
C:ProgramDataCalico Pie folder but also the
Windows Registry keys for
HKEY_CURRENT_USERSoftwareCalico Pie and
HKEY_LOCAL_MACHINESOFTWARECalico Pie.
Ensure you have suitable file backups and either a
Windows Registry backup or a
System Restore point to allow recovery if anything should go wrong.
At present there are NO
FHUG Help pages for this Plugin ~ I will add them later as necessary.
Getting to this stage took a bit longer than expected.
I was originally using
regedit to export/import the
Windows Registry keys.
But found
Windows 7 &
Vista Administrator accounts invoke
User Account Control every time
regedit is run, which was too annoying.
I now use the Commands
REG QUERY,
REG EXPORT and
REG IMPORT which run in a Batch
.bat file.
This causes a
Command Prompt window to popup briefly when the Plugin starts, and on each
Backup and
Restore, but is less intrusive.
I have run the Plugin on
Windows 7 (64-bit),
Vista (32-bit), and a slow
XP (32-bit) laptop.
I have used
Administrator accounts,
Standard User accounts, and
Guest accounts.
If running a non-Windows Firewall, such as
Comodo, the Batch
.bat file may need approving initially.
There should be little risk in using the
Backup operation.
There is some risk in using the
Restore operation for the
C:ProgramDataCalico Pie custom data files.
There is a higher risk in using the
Restore operation on the
Windows Registry keys for FH
Preferences.
See
Understanding the Scope of Features for details of which
Preferences are stored in the
Windows Registry.
There are warnings on the Internet about Exporting/Importing Registry keys under the
HKEY_LOCAL_MACHINESOFTWARE keys.
- Windows XP non-Administrator accounts are not supposed to have write access to these keys.
- Windows 7 & Vista non-Administrator accounts use Virtualisation to overcome this problem.
- Migrating Registry keys for a 32-bit application like FH between 64-bit and 32-bit PC should beware of HKEY_LOCAL_MACHINESOFTWAREWow6432Node keys.
So far I have not encountered any of the above problems.
[EDIT] I have discovered that the
HKEY_LOCAL_MACHINESOFTWARE[Wow6432Node]Calico PieFamily Historian... keys grant
Everyone permission for
Full Control, which explains why any user account can write to those keys.
Please let me have your feedback, but do identify which Windows version and what type of Account you are using.
I am particularly interested if Dropbox or similarly synchronised PC can exchange Backup/Restore data OK.
Backup/Restore FH Customisations
Posted: 23 Mar 2012 02:36
by BillH
Mike,
It seems like one possible use for this would be to allow me to backup my beta 5 settings and restore them to the new version 5 when it comes out.
I'm assuming that when it comes out, version 5 will use the folder c:ProgramDataCalico PieFamily Historian. Would it be possible to restore to this folder from the folder that holds the backup for Family Historian 5.0 Beta?
I thought maybe I could just rename the folder from 'Family Historian 5.0' to 'Family Historian' and then run the restore, but I was concerned this might not work because of the Registry.keys file and the Version.data file that contain the Family Historian 5.0 Beta folder name and version number respectively.
If that won't work, is there any other way to easily copy over my beta 5 settings to the new version 5?
Thanks,
Bill
Backup/Restore FH Customisations
Posted: 23 Mar 2012 11:52
by tatewise
Bill said
It seems like one possible use for this would be to allow me to backup my beta 5 settings and restore them to the new version 5 when it comes out.
Currently the Plugin prevents such operations, because the risks associated with migrating settings between different FH Versions is too great.
However, for Beta testers there are some possible techniques.
1) Copy Custom Data Files
The simplest and safest is to use
Windows Explorer to copy all the required customised data files from the
Backup Data folder for
Family Historian 5.0 Beta to the
Program Data Calico Pie folder for
Family Historian Version 5.
These files would be the ones in
Custom folders only, unless you have customised
Standard settings, or
Property Box Tabs, etc.
However, this method will NOT restore
Tools > Preferences and other
Registry based settings.
2) Edit Registry Data & Restore
This is a riskier route, but should work OK.
a) Rename Backup Folder
Rename the
Backup Data folder for
Family Historian 5.0 Beta to
Family Historian.
b) Edit Registry.keys
Open the
Registry.keys file with
Notepad and similarly replace every
Family Historian 5.0 Beta with
Family Historian.
Also copy the installed
[HKEY_LOCAL_MACHINESOFTWARECalico PieFamily Historian2.0] keys section obtained from a
Backup into this edit.
Then
File > Save the
Registry.keys file.
c) Edit Version.data
Open the
Version.data file with
Notepad, correct the Version number, and use
File > Save.
d) Run Plugin Restore
The
Restore operation should then work OK.
If enough Beta testers wanted this feature, then it might be possible to provide a special variant of the Plugin to automate the process.
It would need to use
regedit and suffer
UAC popups in order to create plain text (instead of binary)
Registry.keys files, that the Plugin can read, edit, and write.
Backup/Restore FH Customisations
Posted: 23 Mar 2012 19:41
by BillH
Mike,
I've used option 1 before when moving to another computer for example. I think I will use option 2 for this because I really want to get the preferences copied over as well. It is a pain to have to reset them all manually.
I do have a question though. You said:
Also copy the installed [HKEY_LOCAL_MACHINESOFTWARECalico PieFamily Historian2.0] keys section obtained from a Backup into this edit.
I was wondering if you could clarify a couple of things for me.
The
Family Historian 5.0 Beta Registry.keys file already has a section called this. Does the one from the
Family Historian file replace the one that is already there?
I'm assuming it is just the
[HKEY_LOCAL_MACHINESOFTWARECalico PieFamily Historian2.0] section. I shouldn't do the
[HKEY_LOCAL_MACHINESOFTWARECalico PieFamily Historian 5.0 Beta2.0Preferences] section also should I? Just want to be sure.
Thanks
Bill
Backup/Restore FH Customisations
Posted: 23 Mar 2012 20:22
by tatewise
Your interpretation is perfect.
The reason that section is required is for the Version digits, and I suspect the installation key is there too.
However, I think I have modified the Plugin to do it automatically, providing both Family Historian 5.0 Beta and the new Family Historian Version 5.0 are installed on the PC at the same time.
Cannot fully test it until Family Historian Version 5.0 is available, but it looks OK.
Backup/Restore FH Customisations
Posted: 23 Mar 2012 23:58
by BillH
Mike,
That's great! I look forward to using the plugin when the new release of FH is available.
Thanks!
Bill
Backup/Restore FH Customisations
Posted: 24 Mar 2012 23:42
by tatewise
Bill, I presume you are comfortable with the fact that, if the FH 5.0 Beta settings are copied to the new FH V5.0, then any settings it inherits from FH V4.1 will be lost.
In other words, you must ensure any settings you want to retain from FH V4.1 are transferred to FH 5.0 Beta first.
Especially any Tools > Preferences and other Registry settings.
However, if you Backup the FH V4.1 settings, then any individual custom data files can be copied into FH V5.0 later using Windows Explorer.
FYI:
Rather than replace it, the Plugin will simply delete the [HKEY_LOCAL_MACHINESOFTWARECalico PieFamily Historian2.0] section from the Registry.keys file, thus leaving those keys unaffected in the Registry.
Backup/Restore FH Customisations
Posted: 25 Mar 2012 01:51
by BillH
Mike,
I copied all of the settings, references, and custom folders over from 4.1 to the beta so the beta has everything the way I like it. After beta 2, I started using the beta to enter and change things so I haven't used 4.1 for quite some time.
Will you update this thread when the new version of the plugin is available?
Thanks for doing this!
Bill
Backup/Restore FH Customisations
Posted: 25 Mar 2012 23:56
by tatewise
Version 1.1 of
Backup And Restore Family Historian Settings is now available for testing.
This includes the following features:
- Allows the FH 5.0 Beta Backup Data to migrate to a new FH V5.0 installation.
- Handles Diagram Picture and Box Icon image files located outside the Program Data Icons folder.
- Registry Data Keys Backup now always excludes the [HKLM...Family Historian...2.0] Version details section.
- Any existing Backup Data date-time stamp is provided to inform when Backup was performed.
For the
FH 5.0 Beta migration to
FH V5.0 to work, both must be installed, and the Plugin run from
FH 5.0 Beta.
Note that
Registry Settings migrate from the
FH 5.0 Beta current
Windows Registry keys, NOT the
Backup Data ~ Registry.keys file.
Backup/Restore FH Customisations
Posted: 26 Mar 2012 00:27
by BillH
Thanks Mike!
Bill
Backup/Restore FH Customisations
Posted: 26 Mar 2012 15:20
by BillH
Mike,
I downloaded and installed version 5 today. I tried to run the restore and had a couple of problems.
1. When I installed version 5 it asked for my name and key. I put that in and it was accepted. Then I tried to start 5.0 beta and it wouldn't run because it said the key was wrong. So, I put in the name and key for version 4.1. That was accepted and the beta started up. I know this isn't your problem, but I thought you should know.
2. I started the plugin and went to restore the data files and got this error.
3. I tried to run the plugin again to do the registry entries, and got this error.
Bill
Backup/Restore FH Customisations
Posted: 26 Mar 2012 15:26
by tatewise
Thanks for the feedback - remember this is still a beta test version.
Until I can install FH V5.0 there is probably little I can do.
Could Jane or Simon comment on if it is feasible to run FH 5.0.0.7 Beta alongside the new FH 5.0.0?
Bill - If you are comfortable to do it, can you look in the Registry under Calico Pie and see if there are separate keys for Family Historian and Family Historian 5.0 Beta?
Backup/Restore FH Customisations
Posted: 26 Mar 2012 15:32
by Jane
V5 will upgrade a normal V4 installation. V5 beta will not be touched.
Backup/Restore FH Customisations
Posted: 26 Mar 2012 15:35
by BillH
Mike,
What's the delay, it is out there to be downloaded and installed. [grin]
Just kidding. I look forward to you having a chance to test it more.
Thanks,
Bill
Backup/Restore FH Customisations
Posted: 26 Mar 2012 15:37
by BillH
Jane,
Not sure why, but I can't run them both. If I put the key in for version 5, then the beta says it has the wrong key. If I put the key in for the beta (my old 4.1 key), then version 5 says it has the wrong key.
Bill
Backup/Restore FH Customisations
Posted: 26 Mar 2012 15:49
by RogerF
Just tried V1.1 with FH 5.0.0.7 on Win 7. The plugin starts ok, but after a couple of seconds displays this error:

Backup/Restore FH Customisations
Posted: 26 Mar 2012 16:06
by BillH
tatewise said:
Bill - If you are comfortable to do it, can you look in the Registry under Calico Pie and see if there are separate keys for Family Historian and Family Historian 5.0 Beta?
Mike,
There are separate sections under HKEY_CURRENT_USERSoftwareCalico Pie in the registry. I don't see the key here anywhere.
There is no Calico Pie entry under HKEY_LOCAL_MACHINESOFTWARE.
Bill
Backup/Restore FH Customisations
Posted: 26 Mar 2012 16:30
by Jane
Ah I forgot the key, I was thinking about the contents of settings and the registry, which I presumed as per the thread that was was you were talking about sorry.
Backup/Restore FH Customisations
Posted: 26 Mar 2012 17:15
by tatewise
Bill,
With FH 5.0 Beta I presume it will not accept the new FH V5.0 licence key.
Anyway, with FH 5.0 Beta running, please run the Plugin and simply Skip through the Backup options.
What FH Program: Names and Versions are listed in turn.
Regarding the Registry the following entries should exist:
HKEY_CURRENT_USERSoftwareCalico PieFamily Historian...
HKEY_CURRENT_USERSoftwareCalico PieFamily Historian 5.0 Beta...
HKEY_LOCAL_MACHINESOFTWAREWow6432NodeCalico Pie\Family Historian...
HKEY_LOCAL_MACHINESOFTWAREWow6432NodeCalico Pie\Family Historian 5.0 Beta...
On a 32-bit PC there is no Wow6432Node folder.