Directadmin

How to configure multiple backup repositories

If you wish to have (for example) 7 backups repositories, one for the last 7 days, with autorotation meaning “today’s” backup will automatically ovewrite the 7th backup so you never need to delete anything, you can do that with the Reseller Level Backups (and Admin level Backups).

Do accomplish this, we use the cron backups to create multiple backup jobs combined with an ftp transfer to put the backup files wherever we want. Note that you can use 127.0.0.1 to upload to a local ftp account on the same server.

Go to: Reseller Level -> Manage User Backups

Create a Bacukp:

1) Click “All Users” (or whoever you want in the backup)

2) for “when”, click “Cron Shedule”. Leave the values unchanged except for the “Day of week” value. Set that to 1.

3) for “where”, click “ftp” and enter the relevant info for the account. The remote path should include the path to the repository for day 1, eg: /backups/1 (make sure you actually create this directory: /home/reseller/backups/1 )

4) submit the post to create the cronjob.

This will have created the cronjob for the first repository.
Repeat the Creation process and use “2″ for the day of week and /backups/2 for the path, create the directory.
Repeat all numbers though to repository 7.

Note that you can configure the cron schedule to do this for more or fewer repositories if you wish. 7 is easy because of the “day of week” cron option. If you wanted, for example 3 repositories on 3 day rotation, you’d have to leave ‘day of week’ as *, and enter all of the day of months manually:

a) 1,4,7,10,13,16,19,22,25,28,31
b) 2,5,8,11,14,17,20,23,26,29
c) 3,6,9,12,15,18,21,24,27,30