Skip to content

Conversation

@thomasmny
Copy link
Owner

@thomasmny thomasmny commented Jun 26, 2025

Introducing World Backups

World Backups allow copies of worlds to be (automatically) created which can then restored at a later point in time

Getting started

This update introduces new config options

  backup:
    max-backups-per-world: 5 # Maximum: 18
    auto-backup:
      enabled: true
      interval: 900 # In seconds
      only-active-worlds: true
    storage:
      type: local # Options: local, s3, sftp
      s3:
        url: null # Only required when not using AWS S3
        access-key: YOUR_ACCESS_KEY
        secret-key: YOUR_SECRET_KEY
        region: eu-central-1
        bucket: buildsystem-backups
        path: backups/worlds/
      sftp:
        host: YOUR_SFTP_HOST
        port: 22
        username: YOUR_SFTP_USERNAME
        password: YOUR_SFTP_PASSWORD
        path: backups/worlds/
  • backup.max-backups-per-world: The maximum amount of backups a world can have (limited to 18)
  • backup.auto-backup.enabled: When enabled, worlds will be automatically backed up in a predefined interval
  • backup.auto-backup.interval: The interval (in seconds) in which worlds are backed up automatically
  • backup.auto-backup.only-active-worlds: When enabled, only active worlds (worlds with builders in them) will be backed up
  • backup.storage.type: Defines where backups are to be saved to. Can be either local (saved on the server), s3 (saved on an S3 storage) or sftp (uploaded to a server)

When using S3:

  • backup.storage.s3.url: If not using AWS S3, specify the S3 storage's URL
  • backup.storage.s3.access-key: The access key required to access the S3 storage instance
  • backup.storage.s3.secret-key: The secret key required to access the S3 storage instance
  • backup.storage.s3.region: The region of the S3 storage instance
  • backup.storage.s3.bucket: The bucket in which backups are to be stored
  • backup.storage.s3.path: The path at which backups are to be stored within the bucket

When using SFTP:

  • backup.storage.sftp.host: The server host
  • backup.storage.sftp.port: The server port
  • backup.storage.sftp.username: The username required to access the server
  • backup.storage.sftp.password: The password required to access the server
  • backup.storage.sftp.path: The path at which backups are to be stored on the server

Creating a backup

Automatically

When enabled in the config, backups are automatically created in the defined interval.
If backup.auto-backup.only-active-worlds is set to true, the time until a backup will be only created is only incremented as long as a builder (i.e. player who can modify the world) is present in the world.

Manually

Players with the permission buildsystem.backup.create can manually create a backup of the world they are in using /worlds backup create.

Viewing backups

Creators of a world (or players with the buildsystem.admin bypass permission) can view the backups of the world they are in using /worlds backup. Additionally, they will need the permission: buildsystem.backup.

Each backup item's name will have the date and time at which it is was created.

Restoring a backup

Warning

Restoring a backup of the server's main world (often world) can lead to issues and is not advised. If you decide to do so, make sure to restart the server immediately after.

To restore a world to a backup, simply click on the desired backup within the backups overview. You will then be prompted to confirm the action since it cannot be reverted.

@thomasmny thomasmny added this to the v3 milestone Jun 26, 2025
@thomasmny thomasmny self-assigned this Jun 26, 2025
@thomasmny thomasmny mentioned this pull request Jun 26, 2025
@thomasmny thomasmny linked an issue Jun 26, 2025 that may be closed by this pull request
- Load backups in `/worlds backup` asynchronously
- Improvements to restoring backups
- Add ability to also backup not active worlds
- Store used generator type for imported worlds
This allows the first backup deletion, then creation action to better be performed sequentially
@thomasmny thomasmny marked this pull request as ready for review June 28, 2025 11:54
@thomasmny thomasmny merged commit 6e961a5 into dev/v3 Jun 28, 2025
2 checks passed
@thomasmny thomasmny deleted the v3/world-backups branch June 28, 2025 11:54
thomasmny added a commit that referenced this pull request Jun 30, 2025
thomasmny added a commit that referenced this pull request Jul 1, 2025
thomasmny added a commit that referenced this pull request Jul 7, 2025
thomasmny added a commit that referenced this pull request Aug 10, 2025
thomasmny added a commit that referenced this pull request Aug 15, 2025
thomasmny added a commit that referenced this pull request Aug 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

World backup systems

2 participants