emsm.plugins.backups
¶
About¶
Extends the EMSM by a backup manager.
Download¶
You can find the latest version of this plugin in the EMSM GitHub repository.
Configuration¶
main.conf¶
[backups]
archive_format = bztar
restore_message = This world is about to be ressetted to an earlier state.
restore_delay = 5
max_storage_size = 30
backup_logs = yes
exclude_paths =
archive_format
Is the name of the archive format used to create the backups. This string has to be listed in shutil.get_archive_formats(). Usually, there should be at least zip or tar available.
restore_message
Is send to the world’s chat before restoring the world.
restore_delay
Seconds between sending the restore_message to the chat and starting the restore.
max_storage_size
Maximum number of backups in the storage folder, before older backups will be removed.
backup_logs
Ifyes
, the log files are included into the backup, otherwise not.
exclude_paths
If given, these
glob()
like paths in a world folder are not included into the backup.Use one line for a path.
See also
*.world.conf¶
Some global configuration options can be overridden for each world:
- archive_format
- max_storage_size
- backup_logs
- exclude_paths
# In a *.world.conf configuration file
[plugin:backups]
max_storage_size = 10
exclude_paths = logs
banned-ips.json
crash-reports
Arguments¶
Note
All arguments will only affect the worlds selected with –world or –all-world
-
--list
¶
Lists all available backups.
-
--create
¶
Creates a new backup.
-
--restore
PATH
¶ Restores the world with the backup from the given BACKUP_PATH.
-
--restore-latest
¶
Restores, if available, the latest backup of the world.
Opens a menu, where the user can select which backup he wants to restore.
Cron¶
You should create a cronjob to create daily backups:
# m h dom mon dow user command
# Creates a backup of all worlds everyday at 2:00h
0 2 * * * root minecraft -W backups --create
Backup archive structure¶
A typical backup archive has this structure:
o
|- world_conf.json # The EMSM configuration of the world
|- world # the minecraft world
|- server.log
|- server.properties
|- ...
Changelog¶
EMSM v3¶
- changed package structure and dropped support for EMSM v2 backups.
EMSM v5¶
- the world’s dedicated configuration file is now saved, instead of the world’s configuration section. This also means, that we can not restore the configuration of backups created with EMSM v3. The worlds can still be restored.