-
Notifications
You must be signed in to change notification settings - Fork 411
Cross Platform Data Sharing
The .pyfa
user directory contains the users settings and fit database, and is not platform-specific. It is easy to move this directory between platforms and retain the data. Or, if you wish to have different settings for different platforms, you can simply move the saveddata.db
file.
It is not very practical, however, to constantly move these files around if you wish to share the database with various platforms. Fortunately, and easier way is possible with existing tools for symbolic links: ln -s
in Linux and mklink /J
in Windows.
Keep in mind, it is usually easier to keep pyfa data on the Windows partition as it is trivial to mount an NTFS partition in Linux/OSX, whereas it's difficult or outright impossible to mount Linux partitions in Windows. Alternatively, if you do not wish to rely on mounted partitions, or if you share your data between multiple computers or platforms, storing your .pyfa
directory on a cloud service such as Dropbox and then using platform-specific linking to the Dropbox location works very well.
In this example, I want to share my .pyfa
directory directory between my Desktop, which runs Windows 7, and my laptop, which runs Arch Linux. I use Dropbox to keep important files synced between the two. To set up the sharing, I move my existing .pyfa
directory to my Dropbox account. I then create a symbolic links (named Junction links in Windows):
Windows Vista and above:
> mklink /J %HOMEPATH%\.pyfa %HOMEPATH%\Dropbox\.pyfa
Junction created for \Users\blitzmann\.pyfa <<===>> \Users\blitzmann\Dropbox\.pyfa
Linux: (should work on OS X as well)
$ ln -sv ~/Dropbox/.pyfa ~/.pyfa
‘/home/blitzmann/.pyfa’ -> ‘/home/blitzmann/Dropbox/.pyfa’
Pyfa should still look at ~/.pyfa
, but since it is now linked to the directory in Dropbox the content is stored and read from there, making it easy to share across many computers.