Managing Disk Space
FastBack makes it easy for you to store lots of snapshots of your world. They save quickly and don’t use up too much disk space.
But eventually, you’ll probably want to get rid of older snapshots you don’t need anymore so you can get some disk space back.
Pruning Snapshots
To do this, you can run the prune
command to delete old snapshots that you don’t need anymore.
/backup prune
By default, this will retain the last snapshot from each day, plus all snapshots from the last 3 days. All other snapshots will be removed.
Changing How Snapshots are Retained
You can change the rules for retaining snapshots by running set retention-policy
:
/backup set retention-policy [policy] [arguments...]
Where [policy]
is one of
Action | Use |
---|---|
daily | Daily: Keep the last snapshot from each day, plus all snapshots from the last n days |
fixed | Fixed: Keep only the n most-recent snapshots. |
gfs | GFS: Keep every backup today + latest daily backup in the last week + latest weekly backup in the last month + latest backup of each month |
all | Retain all snapshots; never prune |
For example, to change the policy to keep the five most-recent snapshots, run:
/backup set retention-policy fixed 5
Collecting Garbage
The prune
command marks the snapshots as unused but does not delete from disk. To actually delete the snapshots and reclaim the disk space they occupy, you need to
/backup gc
WARNING: This command can take a long time (5+ minutes). For large worlds (1gb+), you may be better off running git gc
from the command line instead.
Managing Snapshots on a Remote
You can also manage snapshots on a remote backup on a similar way using the set remote-retention-policy
and remote-prune
commands. For example,
/backup set remote-retention-policy daily 7
will set the retention policy for snapshots in the remote backup to keep all snapshots for the last 7 days and at most one snapshot per day before that. Then, you can prune old snapshots on the remote by running
/backup remote-prune
Note: it is not possible to perform garbage collection on the remote using minecraft commands; you have to run it directly on the server. Many git servers will do this automatically for you but it depends on which server you’re using and how it’s configured.