-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
Matthieu BOHEAS edited this page Dec 5, 2020
·
2 revisions
You have now to define your backup profiles. Profile is a configuration composed of a compression type (zip, ...), a destination (file,ftp,s3,...) and eventually a cron definition. You can define many profiles according to your needs:
- backup worlds & plugins every sunday at 3:00am on AWS S3
- backup worlds every 6 hours on local machine
- backup plugins configuration every hours on local machine
- and so on...
backups:
# your profile "worlds", you can name it as you want
# this profile will:
# - compress worlds (world, world_nether, world_the_end) into a zip file called "{date}{time}.zip" (according to the time when backup is performed)
# - upload the the zip file to s3://your_bucket/backups/world/{date}{time}.zip
# every 6 hours (00:00, 06:00, 12:00, 18:00)
# and keep no more than 5 files on remote service
worlds:
# is this backup will run automatically or not
enabled: true
# crontab definition (use https://crontab.guru/ for easier configuration)
# Define when your backup is running
cron: 0 */6 * * * # every 6 hours
# your file name after compression
# variables:
# - timestamp: 1606987858 (every seconds from 1970-01-01 00:00:00)
# - date: 20201231
# - time: 235959
# - uuid: random UUID like 2cd7957d-dd21-4b32-9424-283e2928b856
# - backup: your backup name, here "worlds"
filename: "{date}{time}.zip"
# how much backup file you keep on your destination
rotation: 5
# Define what is in the compressed file
compression:
# define what type of compression is used (zip is native, other types need plugins)
type: zip
# At least one of these properties is required (worlds, include)
worlds:
- world
- world_nether
- world_the_end
# Define where the backup file will be sent
destination:
# Send your file to AWS S3 with the plugin uBackup-S3
# Set the type to s3
type: s3
# this is your S3 bucket name
bucket: your_bucket
# this is the path inside your bucket where
# you want your backups ot be uploaded
path: backups/world
# your bucket region
region: eu-west-3
# Authentication information (unsecure)
client_id: insert_your_client_id
client_secret: insert_your_secret
# Authentication information (secure) (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
# if profile is set, client_id & client_secret are ignored
profile: mc-backup
# your profile "plugins", you can name it as you want
# this profile will:
# - compress plugins/ folder but not plugins/dynmap into a zip file called "{timestamp}.zip" (according to the time when backup is performed)
# - upload the the zip file to ftp://admin:[email protected]:21/backups/plugins/{timestamp}.zip
# every day (00:00)
# and keep no more than 7 files on your ftp server
plugins:
filename: "{timestamp}.zip"
cron: 0 0 0 * * * # every day
rotation: 7
compression:
type: zip
# include other files to the backup file
include:
# backup everything in plugins/ directory
- plugins/
# exclude some files to not be backed up
exclude:
# dont backup your dynmap map files
- plugins/dynmap/
destination:
# Save file on FTP server (need uBackup-FTP plugin)
# Set the type to ftp
type: ftp
# if true, use SFTP protocol, otherwise simple FTP
secure: false
# ftp connection information
host: "192.168.0.1"
port: 21
# ftp login credentials
username: admin
password: password
# remote directory
path: backups/plugins