Backup rotation?

lolfust1

Verified User
Joined
Oct 24, 2015
Messages
42
hey, until jetbackup decide to be alive, a quick question on directadmin when you create backup job daily, lets say i want only to say last 7 days on the remote ftp server, but there is no rotation option on directadmin so how could i make it delete old backups?
 
DA backup function do not have any options.

I use cron to delete backups.

For example:
Code:
find /path/to/backups/folder/ -ctime +6 -exec rm -rfv {} +

This will remove backup files + folders older than 7 days.
 
Last edited:
hey, until jetbackup decide to be alive, a quick question on directadmin when you create backup job daily, lets say i want only to say last 7 days on the remote ftp server, but there is no rotation option on directadmin so how could i make it delete old backups?

That is not a problem. Instead of deleting the old backups, DirectAdmin can overwrite the old backups. So if you only want to keep 7 days on remote FTP server, then in the drop down for "Append to path" you select "Day of week". Then you will never have more then the 7 last days in backups, and when new backups is created, the oldest one will be overwritten.

For more information please see: https://www.directadmin.com/features.php?id=1565
 
Thank trying it, will update,
will it let users and users of reseller restore backups?
 
That is not a problem. Instead of deleting the old backups, DirectAdmin can overwrite the old backups. So if you only want to keep 7 days on remote FTP server, then in the drop down for "Append to path" you select "Day of week". Then you will never have more then the 7 last days in backups, and when new backups is created, the oldest one will be overwritten.

For more information please see: https://www.directadmin.com/features.php?id=1565

question do i need to create 7 cronjobs or 1 is fine?
 
You only need to create one cron job, create the cron job so that it runs daily.
 
No, it will run every day, it says sunday just to show a example of what will be put in the file name. The backup will be generated every day as long as you create the cron job so that is run every day.
 
No, it will run every day, it says sunday just to show a example of what will be put in the file name. The backup will be generated every day as long as you create the cron job so that is run every day.
yeah saw it it changed the name of the day now, so it maintain 7 backups and overwrites the old ones?
another question, its possible to enable restore those ftp remote backups to users? or only root can restore those?
 
Hi,

We have started selling DA to clients on a regular basis. I want to setup backup from DA reseller account using 'Manage User Backups' to remote ftp . How to set the cron so that 7 days backup is stored to remote ftp. I tried following below guide and selected week but it is creating a folder with 'week1' and only 1 day backup. How to set up the 'Cron Settings' part to get 7 days backup.

Please help...Thanks

Ref URL:

DA-BACKUP CRON.png
 
Back
Top