-
Notifications
You must be signed in to change notification settings - Fork 5
Backups
Backing up can be as easy as typing backup
in a server's control panel which will use a default backup profile. However if you are looking for more customization you should use a custom Backup Profile.
A backup profile is used alongside any backup command to specify the characteristics of the backup. Currently there are 3 options for each backup profile (more will be added in the future):
All backup commands using this profile will be stored in this directory. You can type null to store the backups in the server's jar directory.
When backing up, the manager will look for any old backups of the same profile in the specified directory. If an old backup is found the manager will then sync with the old backup only copying and deleting changed files. This saves a lot of resources since unchanged files are not recopied over. The manager then renames the old backup file to indicate the new date of that backup.
This is a powerful tool to customize what gets copied.
The include arguments list works as a whitelist. meaning when you add arguments to it, Only the files that match your expressions are included.
The exclude arguments list works as a blacklist. meaning everything is included except for the files that match your expressions.
The excluding arguments are executed before the including arguments there for if there are conflicting rules the exclusion will always win.
Examples:
- If you want to backup files that end with an extension (yml for example) you include this argument only
*.yml
. - If you want to backup everything except for any folder named plugins you exclude
*/plugins/*
. - If you want to only include folders that start with "world" except for "world_test" you can exclude
*/world_test/*
and include*/world*/*
.
The patterns are simple, just use *
as a wild card that matches all characters.
Regex patterns may be added in the future in replace of this simple pattern matching.
The backup command can be scheduled like any other command by following this guide.