Skip to content

Repository files navigation

mc_tools

A small command-line tool for backing up, restoring, and syncing Minecraft server worlds.

Written in Rust. No dependencies beyond a Rust toolchain to build, and tmux / rclone if you want to use those features.

Commands

backup

Creates a timestamped backup of a server's world directory. If a previous backup exists, unchanged files are hard-linked instead of copied, so backups after the first one are fast and use very little extra disk space.

If you pass --server-session, it will send a save-all command to that tmux session before backing up, then wait 10 seconds for the save to finish.

mc_tools backup --server-dir /path/to/world --backup-dir /path/to/backups [--server-session tmux_session]

restore

Restores a backup into a target directory. Works with either a plain backup folder or a .tar.gz archive.

mc_tools restore --backup-source /path/to/backups/backup_timestamp --restore-dir /path/to/world

purge

Meant to delete backups older than a given retention period. Not implemented yet — running this currently just logs what it would do.

mc_tools purge --backup-dir /path/to/backups [--retention-days N]

synctogdrive

Compresses each dated backup folder into a .tar.gz and uploads it to Google Drive using rclone, then deletes the local compressed copy. Requires rclone to be installed and configured with a remote named gdrive (or pass your own with --remote-path).

mc_tools synctogdrive --root-dir /path/to/backups [--remote-path gdrive:]

Building

cargo build --release

A Nix flake and devenv setup are included if you'd rather use those instead of a plain Cargo install.

License

GPL-3.0

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages