Skip to content

hudsonhds/BetterBackups

BetterBackups

Production-ready backup plugin for Paper / Spigot targeting Minecraft 1.21 through 1.21.11.

Features

  • Fully asynchronous backup pipeline (no blocking file I/O/compression on main thread)
  • Modular service architecture:
    • BackupManager
    • CompressionService (strategy pattern)
    • StorageService
    • RetentionService
    • SchedulerService
  • Scheduling modes:
    • fixed interval
    • cron
    • idle/no-player windows
    • scheduled restart with backup
    • startup/shutdown trigger flags
  • Player controls:
    • kick players at backup start
    • block joins while backup runs
    • require empty server
    • wait-for-empty timeout
  • Full snapshot backups by default (incremental disabled by default)
  • Restore command with confirmation + partial scopes (worlds, plugins, config, all)
  • Retention enforcement:
    • max count
    • max age
    • max total size
  • Integrity options:
    • SHA-256 checksum
    • post-backup verification
  • Safety checks:
    • disk space threshold
    • partial backup cleanup
    • overlap prevention
  • Config auto-updater for missing keys (with backup on large migrations)
  • Modrinth update checker
  • Optional FastStats integration toggle
  • Audit logging to plugins/BetterBackups/backup.log

Commands

  • /backup now - run a backup now
  • /backup list - list backups
  • /backup delete <id> - delete backup
  • /backup restore <id> [all|worlds|plugins|config] [confirm] - restore backup
  • /backup reload - reload config and scheduler

Permissions

  • backup.run
  • backup.restore
  • backup.list
  • backup.admin

Backup Flow

  1. Run pre-backup commands and save-all on main thread.
  2. Optionally run save-off.
  3. Stage files to temporary folder.
  4. Compress staged data.
  5. Atomically move archive to final storage.
  6. Write metadata/manifest, run retention, post commands, optional save-on.

Compression

  • Native ZIP support is always available.
  • Compression type is now selected automatically from backup.compression.level:
    • 0-2 -> tar
    • 3-6 -> zip
    • 7-9 -> 7z
  • Optional external binary for tar/7z:
    • Preferred: set per-format paths:
      • backup.compression.tar_binary_path
      • backup.compression.seven_zip_binary_path
    • Legacy fallback path: backup.compression.binary_path, or
    • Enable startup download with backup.compression.auto_download_binary_on_startup: true
    • Provide download URLs:
      • backup.compression.tar_download_url
      • backup.compression.seven_zip_download_url
  • Automatic fallback to ZIP when external compression is unavailable.

Setup

  1. Build:
./gradlew build
  1. Copy build/libs/BetterBackups.jar into plugins/.
  2. Start server once to generate config (or use bundled config).
  3. Configure src/main/resources/config.yml values for your server workload.

Notes

  • Restore is destructive by nature; always use explicit confirmation and test restores on a staging server first.
  • Incremental restore applies the backup chain from the last full backup to the selected backup.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages