We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on Vesta 2.0 and expect to release it by the end of 2024. Read more about it: https://vestacp.com/docs/vesta-2-development
Vesta Incremental Backup System Using BORG as Backend
-
- Posts: 2
- Joined: Sat Nov 17, 2018 10:08 pm
- Os: Debian 8x
- Web: nginx + php-fpm
Vesta Incremental Backup System Using BORG as Backend
I want to share with you a collection of bash scripts that I made to perform incremental backups of Vesta Control Panel users and server config, using Borg Backup as backend.
The problem
Vesta CP provides by default a backup system, this backup system creates a tar for each user every day (by default 10 copies are saved), But this way of making backups has some disadvantages when you have a lot of users:
- Server overload. Earch time the backup is run, a complete copy of user files are saved.
- Disk space consumption. Each backup copy contains a full backup of the user files. So its very easy to run out of disk space.
The solution
An incremental backup is one in which successive copies of the data contain only the portion that has changed since the preceding backup copy was made. This way you can store lot of backups points, without making a full backup each time.
Borg Backup does an excellent job making incremental backups. And provide very interesting features such as compression, encryption and good performance. You can get more info at https://www.borgbackup.org/
How the script collection works
The main backup script is designed to be run every day via cronjob. This script saves a snapshot of all users, server config and vesta directory into different Borg repositories.
This borg repositories are saved in /backup by default, organized in folders.
Then, different scripts are provided to automatically restore users, webs, mail domains or databases if needed.
Additionally, it is possible to archive users who are no longer active (they are saved into an offline archive directory), and in these users the incremental backups do not run. In this way we also save disk space.
Full explination, install instructions and documentation is available here:
https://github.com/ramirojoaquin/vestac ... al-backups
Its my first git project, please let me know what you think about it.
The problem
Vesta CP provides by default a backup system, this backup system creates a tar for each user every day (by default 10 copies are saved), But this way of making backups has some disadvantages when you have a lot of users:
- Server overload. Earch time the backup is run, a complete copy of user files are saved.
- Disk space consumption. Each backup copy contains a full backup of the user files. So its very easy to run out of disk space.
The solution
An incremental backup is one in which successive copies of the data contain only the portion that has changed since the preceding backup copy was made. This way you can store lot of backups points, without making a full backup each time.
Borg Backup does an excellent job making incremental backups. And provide very interesting features such as compression, encryption and good performance. You can get more info at https://www.borgbackup.org/
How the script collection works
The main backup script is designed to be run every day via cronjob. This script saves a snapshot of all users, server config and vesta directory into different Borg repositories.
This borg repositories are saved in /backup by default, organized in folders.
Then, different scripts are provided to automatically restore users, webs, mail domains or databases if needed.
Additionally, it is possible to archive users who are no longer active (they are saved into an offline archive directory), and in these users the incremental backups do not run. In this way we also save disk space.
Full explination, install instructions and documentation is available here:
https://github.com/ramirojoaquin/vestac ... al-backups
Its my first git project, please let me know what you think about it.
Re: Vesta Incremental Backup System Using BORG as Backend
I have installed this. Seems to be working well. Only comment I would make is for you installation instructions after the git clone is done all the scripts would need to be move back into the scripts folder from the created vesta-backup- etc folder.
Keep up the good work it is appreciated.
Keep up the good work it is appreciated.
Re: Vesta Incremental Backup System Using BORG as Backend
Good job! For the GDPR compliance it would be perfect if it would encrypt and decrypt the backup.