Information
This article describes how to schedule a backup cycle using Virtuozzo Automator. It is designed to be used as-is; however, it is recommended to read the documentation on backup scheduling first.
The common pattern is to have a weekly schedule with a backup happening each day.
To save space, the following pattern is commonly used: 1 full backup and 6 incremental ones.
In this example, we want to have 2 chains of backups, with 1 full and 6 incremental backups for all environments on the node "Ganymede".
Full backups will be created on Sunday, and incremental backups will be created during the weekdays.
Implementation
Limit the number of incremental backups on the node VE is running on.
There are two ways to do that:
- Limit the maximum number of incremental backups before creating a new full backup
- Limit the maximum period of time before creating a new full backup
There are ways to do this on either of two levels:
- Physical server level: Node -> Configure -> Backup settings
- Global level: Setup -> Configure backups
Since we want to get a chain consisting of 7 backups in total, one of which is a full backup, we will use global settings to limit the maximum number of incremental backups to 6.
Create a new task for a full backup.
Go to Scheduler -> New Task -> Back Up Virtual Environments
Set the name in "Title", set the recurrence pattern to "Weekly" and select "Sunday" as a day to run.
Select the option "Choose a node to back up all its VEs", as we want to back up all environments on it, and select our node "Ganymede".
In the backup options, set the type to "Full", set the destination node, and the number of full backups to keep — 2.
Create a new task for incremental backups.
Go to Scheduler -> New Task -> Back Up Virtual Environments
Set the name in "Title", set the recurrence pattern to "Weekly", and select all days except Sunday.
Select the option "Choose a node to back up all its VEs" and choose our node "Ganymede".
In the backup options, set the type to "Incremental", set the destination node, and the number of incremental backups to keep — 6.
Results
Let’s say we first ran the full backup task on Sunday, January 1st.
After 14 days (or 2 weeks), we will get two chains:
- The chain will full backup created on January 1st will have 1 full and 6 incremental backups, with the last incremental backup being created on Saturday, January 7th
- The newer chain will have 1 full backup created on Sunday, January 8th, and 6 incremental backups, the last being created on Saturday, January 14th.