Setting Up a Pre-Backup Command that Will Automatically Manage Backups Saved to a Network Share
How to set up a bash script that will automatically manage the backups saved to the network share
This document applies to:
- Acronis True Image Echo Server for Linux
Download pre.sh.
Setting the schedule up
- Schedule a daily backup task, choose the network share as a destination for the backup file and select the option to "Create incremental backup if possible":
- Set the downloaded pre.sh bash script as a pre-backup command in the Backup Creation Options and specify the following parameters in the 'Arguments' field dividing them by one space:
- IP Address of computer with the backup share
- Hostname of computer with the backup share
- Name of the backup share
- Username for accessing the backup share
- Password
- Total amount of backup in each backup set (full + a number of incremental backups). If you want to keep a week worth of backups, set this value to 7.
- Amount of older backup sets you want to keep (there will always be the current backup set and X amount of older sets). So, if you want to keep 4 weeks worth of backups, specify 3.
Here is an example of the correctly configured pre-backup command:
Here is what this pre-backup command is going to do
- Once the amount of backups in the backup folder reaches the predefined limit, it will place the entire set to the folder named set1, set2, set3, etc.
- Once the amount of the backup sets reaches the predefined limit, the oldest one (set1) will be deleted and the rest will be renamed in the following way set2->set1, set3->set2, etc.
- If you specify 7 and 3 for the amount of the backups in the backup set and the amount of the older backup sets that you want to keep, you will always have no more than 7 backup files in your backup folder and no more than 3 older sets of backups consisting of 7 backup files each (4 sets total, i.e. the current one + 3 older sets).
(!) Note you can specify any other values than 7 and 3.