PDA

View Full Version : Campaign data stored in Dropbox directory?



ChristopherHammock
July 14th, 2020, 19:10
Hey all!

I'm new to FG and jumping directly into Unity since it seems to be the future. I work and play on two different computers, my desktop at home and a laptop at my girlfriend's. I'd like to use a Dropbox folder to store my campaign data, to keep it synched between the computers. I assume this should work just by changing the Data Directory in Settings. However, I wanted to ask around to see if anyone else had tried this before I risk breaking my system. :) Does anyone have any advice on the matter?

Thanks in advance!
Chris

Zacchaeus
July 14th, 2020, 19:14
Hi Christopher, welcome to FG.

It is not recommended that you use any kind of cloud synchronisation since you can lose data if the sync happens whilst FG is being used. You can use Dropbox but just make sure that there isn't any kind of sync going on whilst FG is being used. It's best actually to simply copy the data manually.

superteddy57
July 14th, 2020, 19:16
It's highly recommended to not use a cloud location to store campaign and/or program files as the syncing could corrupt data. I would keep a backup of your data locally to ensure you don't lose your campaign if you do ultimately go down this path.

ChristopherHammock
July 14th, 2020, 19:52
Cool, thanks for the quick feedback, folks. :) That does make sense, though. I'll probably just stick with back ups on a usb drive. :)

superteddy57
July 14th, 2020, 19:59
I've heard of some success with using cloud storage to use it to copy the data to the storage, and then pasting it to the other computer. Just don't want the program to point to the storage.

LordEntrails
July 14th, 2020, 21:19
There is a batch file on the forums here that will zip up your FG data folder and copy it to a cloud shared folder. If of interest and you can't find it, I can probably find it for you :)

TheoGeek
July 16th, 2020, 20:14
I tried out a scenario where I used Subversion with the repo stored on a local server and the two PCs I typically switched between pulling the campaign data from it. As long as I remembered to commit the changes, it worked great because I never used FG at the same time on the two PCs.

Now, I'm back to 1 PC so I don't need that setup anymore.

chatty
December 9th, 2020, 00:44
I don't wanna go to the basement to work on my campaign, so I may consider the SVN route myself. It's been like a decade since I have used it, is the problem!

Imagix
December 9th, 2020, 03:09
I've been using git up to bitbucket to store my campaign data. Has the additional benefit of making "backups" frequently :)

Valyar
December 9th, 2020, 10:20
I've been using git up to bitbucket to store my campaign data. Has the additional benefit of making "backups" frequently :)
First reaction was "overkill" but I see some benefit in putting the campaign in GIT... especially if you use this as base for other campaign and you need to quickly borrow something :)

Trenloe
December 9th, 2020, 10:28
Reminder - don't use *any* software that performs active sync/backup of your live FG data while you're using FG. Do a manual sync/backup when FG isn't running. It's fine using DropBox/Drive/Box etc. as an intermediary for manual copying of files - e.g. manually copy for FG campaigns directory to DropBox on one computer, then go to the next computer and manually copy that data from DropBox.

For example, you can use something like the batch file in this post to manually do a backup of files when FG isn't running: https://www.fantasygrounds.com/forums/showthread.php?35578-How-to-back-up-AppData-folder-to-OneDrive-automatically&p=308736&viewfull=1#post308736

LordEntrails
December 9th, 2020, 15:26
First reaction was "overkill" but I see some benefit in putting the campaign in GIT... especially if you use this as base for other campaign and you need to quickly borrow something :)
How would you 'borrow' something from one campaign to another using GIT?

How is this different than development campaigns and exporting to a module to then re-use in multiple campaigns?

Speculi
December 9th, 2020, 18:02
If you are proficient enough with the XML layout of FG and with git, etc you could use a diff to merge something into the other campaign... if it is useful and practical, not sure. Don't think it is worth the effort in most cases.

Imagix
December 9th, 2020, 18:11
It is somewhat interesting that FG writes certain files with arbitrary orderings (ie: CampaignRegistry.lua). It moves certain entries around that file, which means that it shows up as modified after pretty much every session.

LordEntrails
December 9th, 2020, 19:49
If you are proficient enough with the XML layout of FG and with git, etc you could use a diff to merge something into the other campaign... if it is useful and practical, not sure. Don't think it is worth the effort in most cases.
That's what I was thinking but couldn't see the practicality of it. But hey, sometimes you know a tool really well and it's just more re-assuring to use it. :)

MDarque
December 9th, 2020, 22:11
Since I work and play on the same network, but on different systems, I set up a shared drive on my desktop with the FG data. Then when playing, my laptop accesses the shared drive directly. Works pretty well for me.

Imagix
December 9th, 2020, 22:32
Beware if you ever end up running FG on both machines at the same time ...

Weissrolf
December 10th, 2020, 09:07
What is the technical reasoning behind the advice against using cloud services other than "don't do it"? Which cases are meant to cause problems (two computers at the same time) and which cases are reported to work (one computer at a time)?

Trenloe
December 10th, 2020, 12:30
What is the technical reasoning behind the advice against using cloud services other than "don't do it"? Which cases are meant to cause problems (two computers at the same time) and which cases are reported to work (one computer at a time)?
Basically, any active sync software that is running when FG is running with a campaign loaded/connected to a GMs campaign could be trying to copy FG files when FG is accessing those files. We've had numerous cases where GMs have their campaign data corrupted, and players have had their campaign cache data corrupted, because they had another application doing file operations against the FG live files.

This is why I said above "Reminder - don't use *any* software that performs active sync/backup of your live FG data while you're using FG. "

If you are using a central network location for FG data (without an application actively copying data there) that is accessed by multiple installs of FG, then don't run two GM instances against that location at the same time (even just having two instances logging to the same logfile can cause file errors). And, as always, never have more than one player instance that shares the same app data directory connected to the same GMs campaign at the same time. to avoid campaign cache errors and corruption.

Weissrolf
December 10th, 2020, 13:41
Users errors and software bugs aside, how does corruption happen when cloud services only read the files while a campaign is actively running? What is the technical explanation?

And why does FG not open these files for exclusive write access (file locking) to begin with, as is good practice since 1963?

Trenloe
December 10th, 2020, 14:07
@Weissrolf, We had this discussion a few months ago. I'm not getting into this again with you. Maybe one of the developers may chime in.

This has been said many times on this forum. In case users are reading this for the first time, I'll re-iterate:

The *very* strong recommendation from the forum and FG developers, based off years of FG support experience, is as I outlined above. If you decide to ignore this advice then do so at your own risk with the potential of losing your campaign data or experiencing incorrect functionality.

Weissrolf
December 10th, 2020, 14:26
So without a technical reason being given the only sensible explanation would be user-error or software-bugs. Now let me give some advice to users in bold letter: Do proper backups independent of your FG cloud folder!

I am successfully using Onedrive for my FG data folders with two running campaigns for months and now switched to Dropbox (for reliability testing after reading the contra advice). If my data should ever get corrupted by user-error, software-bugs or the mysteriously unnamed black cloud hole then I can always go back to my proper backup (daily in my case).

Bonus hint: cloud-services usually offer versioning of files where you can restore an older version of a file/folder. Welcome to the digital presence (still quite stone-ageish).

Suggestion to the developers: Open your file handles for exclusive write access (file-lock) to protect the files from outside tampering during a running campaign. This is tried and true standard practice for decades already.

LordEntrails
December 10th, 2020, 17:24
MOD: I am closing this thread. What has needed to be said has been said.

To Reiterate: Experience shows that using Dropbox or an active sync'd folder location for FG Data has frequently led to data corruption. Simply put, the technical reason(s) do NOT matter.