JMRI Setup: Sharing Files with Dropbox
Dropbox is a free service that lets you share files between multiple
computers across a network. Once you've signed up with Dropbox, you can configure JMRI to use
it to share Rosters, layout configuration files and other information between multiple
computers.
Using Dropbox rather than a shared
folder or network drive has a number of advantages:
- Dropbox keeps a full local copy of all files on every computer, bringing a number of
benefits.
- JMRI will continue to work even if only one computer is on, and even if there is no
network connection.
- There will be no speed penalty when accessing files, as there with a network
connection.
- JMRI data files are not designed for simultaneous update access, as can happen with a
network connection and lead to data corruption. Dropbox works on separate copies of files
and any simultaneous update is handled gracefully by Dropbox. Both versions are saved (with
one renamed) and if necessary you can choose which one to keep.
- Dropbox protects your files by providing hardware redundancy. If a computer fails, the
files are still on the Dropbox servers and any other computers configured to use the same
Dropbox account. A shared network drive does not provide hardware redundancy by
default.
- Dropbox protects your files by providing a limited backup recovery facility. You can
recover any file version or deleted file for the past 30 days, so mistakes can be easily
reverted. A shared network drive does not provide retrievable backup history by
default.
- Dropbox protects your files by providing an off-site copy of both current and recent
(30 days) backup versions. A shared network drive does not provide any off-site copy by
default.
- Dropbox provides clients for Windows, Mac OS and Linux computers. All the files in
JMRI's
User Files Location are stored in an operating-system-independent format so can be
shared by any JMRI client with Dropbox installed. A shared network drive may not
necessarily provide cross-platform sharing.
- Note that neither Dropbox or a shared network drive provide a fully isolated non-live
off-line copy (external device such as USB drive or CD/DVD) by default. That responsibility
is still up to you.
The following approach should also work with other cloud-based file-synchronisation
services such as Google Drive
and OneDrive. However the Dropbox solution is well tested, having been used by a number of JMRI developers
and users for quite some time.
You can also use a revision control system like Git;
those instructions
are somewhat different.
Step 1
To set up a shared User File Location on the web:
- Create a JMRI folder in Dropbox on the first computer.
- If you have already created items (roster entries, panels etc.) go to
Help‑>File Locations and press Open User Files Location.
This will open a window on your desktop showing a directory. Remember where that is,
because you'll move items from there later.
- Still on the Help‑>File Locations window, check to see if your Roster Location is
different from the User Files Location. If so, click Open Roster Location to open a window
on that location. You'll copy files from there later.
- Preferences‑>Roster‑>Roster‑>Roster Location‑>Reset. Do not enter a Roster
Location. That way it will follow the setting for the User Files Location.
- Preferences‑>File Locations‑>User Files Location and set it to the JMRI folder
you created in Dropbox.
- Restart JMRI and use Help ‑> File Locations to make sure everything is changed
correctly.
- If you have already created any files of the types listed at this link (see this page
for help), move them from the old location to your new location. For example, your files in
the User Files window we opened at the first step should be moved to the new User Files
Location you just created.
Step 2-...
The only steps you need to do on subsequent computers are:
- Preferences ‑> Roster ‑> Roster ‑> Roster Location ‑> Reset. Do not enter a
Roster Location. That way it will follow the User Files Location.
- Preferences ‑> File Locations ‑> User Files Location and set it to the JMRI folder you
created in Dropbox.