This plugin backups your server files and supports mysql backup through running os commands.
You can put a list of directories which you want to be backed up and file extension exclusions in the config file.
You can enable automatic backups at a set time and when old backups are removed.
Supports command line execution. The server may need to be started with sufficient permissions in order to make mysql dump work.
To Install this:
- download this plugin and put it in your plugins folder
- reload the server
- open the config.yml in /plugins/NubesBackup
- change the delays and add which folders need to be included in backups
- save the file
- execute /backupreload
You are now good to go!
Commands:
- /backup
- /backupreload
- to reload the config
Permissions:
For /backup
- nubesbackup.backup
For /backupreload
- nubesbackup.reload
Config:
Code (YAML):
#24 hours ~ set to 'disabled' to disable automatic backups
delay
: 01:00:00:00
#3 days ~ set to 'disabled' to disable old backup deletion
deleteifolderthan
: 03:00:00:00
#the commands are executed before the files are backed up
commands:
enable
: false
windows
:
- 'rmdir mysqldumps /s /q'
- 'mkdir mysqldumps'
- '
"C:\Program Files\MySQL\MySQL Workbench 8.0\mysqldump.exe" -uUsername -pPassword
database >
"mysqldumps\%date%.sql" --column-statistics=0'
linux
:
- 'rm mysqldumpold -R'
- 'mv mysqldump mysqldumpold'
- 'mkdir mysqldump'
- 'sudo mysqldump -uUsername -pPassword database >
"mysqldump/%date%.sql"'
# optional if mysql sometimes bugs out
# - 'sudo service mysql restart -uUsername -pPassword'
#you may use subfolders like 'plugins/Essentials'
backuplist
:
- mysqldump
- bukkit.yml
- paper.yml
- server.properties
- plugins
- world
- world_nether
- world_the_end
exclude-extensions
:
[.lock, .jar, examplefile.zip
]
If you have a network it is recommended to have the backup script for mysql only run on your hub server because it's not necessary to backup the mysql database on all backend servers.