Syncing Worlds Across Multiple Computers With Dropbox

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

ThemsAllTook

New Member
Jul 29, 2019
386
0
0
FTB doesn't fundamentally change the way world saves work, so that should all be perfectly applicable.
 

BlackFire

New Member
Jul 29, 2019
344
0
0
Is there a way you can create a scheduled event on your computer where on the event minecraft closes, the local world is synced to the Dropbox? That way it only updates once a play and you have 2 backups.
 

gattsuru

Well-Known Member
May 25, 2013
364
103
68
Is there a way you can create a scheduled event on your computer where on the event minecraft closes, the local world is synced to the Dropbox? That way it only updates once a play and you have 2 backups.
There a pretty large number of ways that program instance can close, and the way Java works makes it particularly difficult to isolate Minecraft instances specifically while remaining robust. I'd recommend instead using a batch file or Powershell Script to run Minecraft (or the Minecraft Launcher) and then, as the second line on the same script, to run a differential backup tool like RSync or the Windows-default xcopy (with the /keycord argument). Because these scripts are sequential, the second line will only run when the first is totally complete -- ie, the JVM instance closes.

This won't capture certain JVM instabilities, but that may be a feature, rather than a bug.
 

Evil Hamster

New Member
Jul 29, 2019
768
0
0
I do things a little bit differently, but my goal is more to have backups of my world.

I downloaded the 7-zip command line version and put the files in my server folder, then make a zip file of my world before starting the server. It takes about 45 seconds longer to start the server (my world zipped is 1.2G) but has saved me from corruption so many times it's worth every second.

Here is my server 'start.bat':
Code:
del world6.zip
ren world5.zip world6.zip
ren world4.zip world5.zip
ren world3.zip world4.zip
ren world2.zip world3.zip
ren world.zip world2.zip
7za a world.zip "E:\Games\Minecraft\Ultimate_Server\world" -tzip
pause
java -Xms1024M -Xmx1G -jar ftbserver.jar
I then only have to copy one zip file (about 2 minutes) instead of thousands of smaller files (10-15 minutes). I still manually move it where I want it because I prefer it that way.
 

gattsuru

Well-Known Member
May 25, 2013
364
103
68
That's a workable option for on-site backups, but I'd be careful about using it for things like Dropbox, or similar solutions like OwnCloud. The strength of these programs depends on their ability to determine whether an individual file has changed or not, and only transferring significant amounts of data on that change. Zipped files can only be reasonably compared at the file level, not at the level of their contents, and because of that, you're likely to see the entire world transferred on each change.

((The free version of Dropbox only maintains previous versions for a short period of time, though. On-site backups with multiple versions aren't a bad idea, although even then I'd recommend something like Subversion.))