A tool for backup Linux servers on a regular basis.
10K+
A tool for backup Linux servers on a regular basis. This is a rewrite of book000/server-backup in Python3 to make it easier to divert to others.
https://github.com/book000/server-backup-v2
DBBackup: Database backup for MySQL and MariaDBFullBackup: Reverse differential full backup using SSH and rsyncPyMySQLgit clone https://github.com/book000/server-backup-v2.gitrequirements.txt: pip install -U -r requirements.txtThe default config file is config.json. If not specified, string type and required.
discord: Discord notification settings
token: Bot tokenchannel: Channel ID for notificationdir: Data storage directory setting
backup: Backup destination directory (Default: backup/)logs: Logs destination directory (Default: logs/)db: Database backup settings
enable: If enable database backup (boolean、Default: false)keep_days: Number of days to keep the backup (int、Default: 30)hostname: DB Hostnameport: DB Port numberusername: DB Usernamepassword: DB Passwordignores: Ignore settings
db: Database name to exclude if included (list、Default: [])table: Table name to exclude if included (list、Default: [])full: Full backup settings
enable: If enable full backup (boolean、Default: false)keep_days: Number of days to keep the backup (int、Default: 30)hostname: Hostnameport: Portusername: Usernamepassword: Passwordidentity: Public key pathpassphrase: Passphrase of the public keyfrom: Directory to back up (Default: /)ignores: Directory files to exclude (list、Default: [])The following permissions need to be set globally for the backup user account.
Backups are done with rsync and sudo is used to back up all files.
For this reason, you need to be able to use sudo rsync with no-tty and no-password.
Add the following to the sudoers file on the remote server with visudo.
Defaults!/usr/bin/rsync !requiretty
USERNAME ALL=(ALL) NOPASSWD: /usr/bin/rsync
USERNAME must be the username to log in to the remote server.
This setting will allow you to retrieve all files that can be viewed as root (sudo) in the event of a successful SSH login with this account. If you are concerned about security issues, we recommend that you do not use this feature.
The license for this project is MIT License.
Content type
Image
Digest
sha256:2fd1758ce…
Size
89.3 MB
Last updated
8 days ago
docker pull book000/server-backup-v2