vestacp-backup-manager
vestacp-backup-manager copied to clipboard
[DEPRECATED] Bash-Script to manage your VestaCP backups
This repository is DEPRECATED. Please don't use this backup script any longer.
The way better alternative is to use Duplycity (with duply)!
VestaCP Backup Manager
With the VestaCP Backup Manager you can easily manage all your Webserver backups created by the Vesta Server Control Panel
Introduction
VestaCP creates by default a daily backup on the Server with all eMails, databases, webfolders and domain configurations.
This Manager is based on a bash-script that you can run via a cronjob.
It downloads the backups from VestaCP to your local HDD and will delete older backups from the server automatically.
Getting started
In order to use this script you just need to set up a ssh-key on your backup machine (e.g. a Raspberry Pi, local pc) and configure a cronjob.
How to setup a ssh-key
If you did not already set up a ssh-key to access your server, you can find more information on the internet.
How to setup a cronjob
Just login to your (local) backup machine and open a terminal.
-
Open the cronfile:
sudo crontab -e -
Configure a backup job:
0 3 * * * /path/to/vestacp-backup-manager.sh -
Save and close the file.
The command above will run the script every day at 3:00 am.
Here you can find further information.
Settings
To get the script up and running, you just have to edit the settings in vestacp-backup-manager.sh:
server: the server adress (FQDN)
user: the ssh user to login on the server
backupuser: the VestaCP user whose backups are to be stored
server_path: the server path where the backups are saved from VestaCP
local_path: the local path where the backups should get downloaded to
backup_on_server_days: the amount of days the backups will remain on the server before they get deleted
amount_local_backups: the amount of backups that will be stored on the disk. If new backups are downloaded, the oldest will be deleted, so that only this amount of backups is stored on your local disk.
max_download_retries: the amount of maximum attempts to download a backup, if something gone wrong