Page 1 of 1

Synchronisation between two PC

Posted: 24 Jan 2023 10:16
by PhilipR
Good Evening

I am attempting to run FH7 on two computers, a Desktop and Laptop. I have read the FHUG article in the Knowledge Base regarding Syncronisation but still have some issues. Currently I am using OneDrive as the sync service.

When I backup on one computer the file appears straight away on that computer but does not come up the other computer, in this case after two days it is still not there.

I have tried using both Dropbox and Google Drive but have the same problem. I have also used a USB Flash Drive.

Could someone who syncs the program between two computers please put me on the righ track with this. Am I using incorrect setting or is this a sync problem?

Thank you
Philip

Re: Synchronisation between two PC

Posted: 24 Jan 2023 10:54
by tatewise
Hello Philip.
I sync FH Projects between my desktop and laptop via OneDrive.
Presumably, the FHUG KB article you followed is the Synchronising Family Historian between 2 PCs and especially its Microsoft OneDrive section.

Please confirm which section's steps you used: Conventional method using the OneDrive subfolder or the Alternative method using Auto-save Update Folders option.

You mentioned 'backup' but synchronisation does not rely on backup. The FH Project files are synced automatically.

You also mentioned using a USB Flash Drive which cannot perform auto synchronisation.

The first thing to check is that you have OneDrive running on both PC with the same Microsoft account.
So both PC should have the OneDrive cloud icon in the Windows Notification area bottom right.
They should also have a OneDrive folder that can be opened by clicking the OneDrive cloud icon and choosing Open folder.
If you create/copy a file into that OneDrive folder on one PC it should soon appear in the OneDrive folder of the other PC.
Does that happen?

The FH Project Location must refer to the same folder inside the OneDrive folder on both PC.
How that is achieved depends on which of the two methods mentioned above you have followed.

Re: Synchronisation between two PC

Posted: 24 Jan 2023 11:34
by Little.auk
Have you read the Knowledge base section on setting up directory junctions ( https://fhug.org.uk/kb/kb-article/synch ... junctions/ )? This explains the need for, and how to set up Directory Junctions. Which I describe briefly below -

On a Windows PC, FH stores a lot of the files you need to synchronise in the ProgramData directory (which is hidden by default). On my PC that is in C: \ ProgramData\Calico Pie\Family Historian\. The directories you need to sync include Plugins, Plugin Data, Queries, Reports and Source Templates. Otherwise, things like Custom Queries made on one machine will not appear on the other!

For OneDrive to be able to synchronise these folders they have to be moved into the OneDrive folder - but if you do that FH can't find them, as there is no option to make FH look anywhere else for them!!!!

The answer is to create "Directory Junctions" using the command line instruction mklink /J for example - mklink /J "c:\ProgramData\Calico Pie\Family Historian\Plugins" “d:\Users\USER NAME\OneDrive\FH Projects\ProgramData_Sync\Plugins”

You have to set up these links on both PCs - in my case OneDrive files are on the "D:\" drive on my PC so "d:\users" as above, but on my laptop they are on the "C:\ drive.

There are one or two things to be aware of -

1 - you may need to switch on "View Hidden Folders" to see the ProgramData folder, which is hidden by default.
2 - mklink can only create links to Directories (Folders) and their contents, you can't link individual files.
3- first create your "sync" folder in your OneDrive folder (in my example I put it in my \FH Projects folder as \ProgramData_Sync\) then copy each of the directories you want to sync to this "sync" folder from the \ProgramData\Calico Pie\Family Historian\ folder.
4 - You can delete the original folders if you want, but I prefer to rename them as "Plugin - No Sync" etc.
5 - If you have used mklink correctly you will see new Linked Folders in the \ProgramData\Calico Pie\Family Historian\ folder as below
6 - MOST IMPORTANT - Never delete the synchronise folders, or files in them from the OneDrive directory The directory links in ProgramData are purely that - links to the OneDrive Files. If you move these files, or rename directories the links will be broken, If you delete the files all custom changes will be lost!

Screenshot 2023-01-24 112020.jpg
Screenshot 2023-01-24 112020.jpg (7.58 KiB) Viewed 849 times
Hope this helps

Re: Synchronisation between two PC

Posted: 24 Jan 2023 12:10
by tatewise
Thank you for that advice Peter but I suspect it's too advanced to help Philip with his problem which sounds much more fundamental as he seems to be unable to sync Projects yet.

Re: Synchronisation between two PC

Posted: 24 Jan 2023 19:36
by Little.auk
Philip,

You mention Backup files not showing on the second computer -

If you want to sync files between both computers they have to be saved in the OneDrive folder, so you have to make sure that backup files are saved there. Even then, depending upon the speed of your internet connection and the size of the backup file, it can take a long time to upload from your PC to the cloud and then synchronise to your Laptop. A full FH backup can be a pretty big file!

Also, if you want to use FH on your laptop away from home (i.e. with no internet connection) you need to make sure that your FH folders on OneDrive are set to "Keep on this Device".

Re: Synchronisation between two PC

Posted: 25 Jan 2023 03:23
by PhilipR
I have received three replies to my above post and wish to answer each individually.

How do I do it?

Thanks
Philip

Re: Synchronisation between two PC

Posted: 25 Jan 2023 04:10
by BillH
Just click on the Post Reply button once and reply to the first posting you wish to reply to. I would put the name of who you are replying to in the text of your reply so we know who you are replying to. Alternatively, for that first posting that you with to reply to, click on the icon with the double quote (") and it will quote the posting in your reply.

Then do the same for the second and third posting you wish to reply to.

Bill

Re: Synchronisation between two PC

Posted: 27 Jan 2023 05:29
by PhilipR
Thanks for your assistance. Since my post my laptop has died so I will not worry about sync at the moment.
Philip

Re: Synchronisation between two PC

Posted: 27 Jan 2023 05:32
by PhilipR
BillH wrote:
25 Jan 2023 04:10
Just click on the Post Reply button once and reply to the first posting you wish to reply to. I would put the name of who you are replying to in the text of your reply so we know who you are replying to. Alternatively, for that first posting that you with to reply to, click on the icon with the double quote (") and it will quote the posting in your reply.

Then do the same for the second and third posting you wish to reply to.

Bill
Thanks Bill.

Philip

Re: Synchronisation between two PC

Posted: 27 Jan 2023 05:35
by PhilipR
Little.auk wrote:
24 Jan 2023 19:36
Philip,

You mention Backup files not showing on the second computer -

If you want to sync files between both computers they have to be saved in the OneDrive folder, so you have to make sure that backup files are saved there. Even then, depending upon the speed of your internet connection and the size of the backup file, it can take a long time to upload from your PC to the cloud and then synchronise to your Laptop. A full FH backup can be a pretty big file!

Also, if you want to use FH on your laptop away from home (i.e. with no internet connection) you need to make sure that your FH folders on OneDrive are set to "Keep on this Device".
Thank you for your response.
Since posting my query my laptop has "died" so I will not worry at the moment.
Philip

Re: Synchronisation between two PC

Posted: 27 Jan 2023 05:37
by PhilipR
Little.auk wrote:
24 Jan 2023 11:34
Have you read the Knowledge base section on setting up directory junctions ( https://fhug.org.uk/kb/kb-article/synch ... junctions/ )? This explains the need for, and how to set up Directory Junctions. Which I describe briefly below -

On a Windows PC, FH stores a lot of the files you need to synchronise in the ProgramData directory (which is hidden by default). On my PC that is in C: \ ProgramData\Calico Pie\Family Historian\. The directories you need to sync include Plugins, Plugin Data, Queries, Reports and Source Templates. Otherwise, things like Custom Queries made on one machine will not appear on the other!

For OneDrive to be able to synchronise these folders they have to be moved into the OneDrive folder - but if you do that FH can't find them, as there is no option to make FH look anywhere else for them!!!!

The answer is to create "Directory Junctions" using the command line instruction mklink /J for example - mklink /J "c:\ProgramData\Calico Pie\Family Historian\Plugins" “d:\Users\USER NAME\OneDrive\FH Projects\ProgramData_Sync\Plugins”

You have to set up these links on both PCs - in my case OneDrive files are on the "D:\" drive on my PC so "d:\users" as above, but on my laptop they are on the "C:\ drive.

There are one or two things to be aware of -

1 - you may need to switch on "View Hidden Folders" to see the ProgramData folder, which is hidden by default.
2 - mklink can only create links to Directories (Folders) and their contents, you can't link individual files.
3- first create your "sync" folder in your OneDrive folder (in my example I put it in my \FH Projects folder as \ProgramData_Sync\) then copy each of the directories you want to sync to this "sync" folder from the \ProgramData\Calico Pie\Family Historian\ folder.
4 - You can delete the original folders if you want, but I prefer to rename them as "Plugin - No Sync" etc.
5 - If you have used mklink correctly you will see new Linked Folders in the \ProgramData\Calico Pie\Family Historian\ folder as below
6 - MOST IMPORTANT - Never delete the synchronise folders, or files in them from the OneDrive directory The directory links in ProgramData are purely that - links to the OneDrive Files. If you move these files, or rename directories the links will be broken, If you delete the files all custom changes will be lost!


Screenshot 2023-01-24 112020.jpg

Hope this helps
Thanks for your response.
Since I posted the query my laptop has "died" so I don't have to worry at the moment!!!
Philip