GIVEN M.A.R.I.L.L.A has gsb set up to track the save state for a multiplayer server
WHEN she runs the command (from any directory)
$ gsb watch my-save
and optionally provides the command-line flag --interval 30m
THENgsb will periodically check the save data aliased by my-save and, when will create new backups with the message "Automatic Backup" until the process terminates
SO she doesn't have to manually run the backups herself
Notes
I'm thinking the default should be 24hr
The bash version of "commit if there are changes" is
Note that this will run gsb as an active process, not as a daemon, as a daemonized version would probably be platform-specific (though there are pure-python ways of doing it--this project may be abandoned, but the alternatives it references are all viable). For example, on (most) Linux systems, I'd want this managed by systemd.
The chance of reading a file while it's being updated is high, and that could totally result in capturing a corrupted save state. Especially for something like a Minecraft world, where different files are written asynchronously. Ideally there would be a way to synchronize automatic saves with automatic backups (and detect something like, "files were updated in the last 60 seconds but not in the last five"), but that's out of scope for now.
GIVEN M.A.R.I.L.L.A has
gsb
set up to track the save state for a multiplayer serverWHEN she runs the command (from any directory)
and optionally provides the command-line flag
--interval 30m
THEN
gsb
will periodically check the save data aliased bymy-save
and, when will create new backups with the message "Automatic Backup" until the process terminatesSO she doesn't have to manually run the backups herself
Notes
bash
version of "commit if there are changes" isgsb
as an active process, not as a daemon, as a daemonized version would probably be platform-specific (though there are pure-python ways of doing it--this project may be abandoned, but the alternatives it references are all viable). For example, on (most) Linux systems, I'd want this managed bysystemd
.