Backup rotation?

lolfust1

Verified User
Joined
Oct 24, 2015
Messages
41
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?
 

xerox

Verified User
Joined
Jul 16, 2019
Messages
84
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:

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,532
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
 

lolfust1

Verified User
Joined
Oct 24, 2015
Messages
41
Thank trying it, will update,
will it let users and users of reseller restore backups?
 

lolfust1

Verified User
Joined
Oct 24, 2015
Messages
41
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?
 

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,532
You only need to create one cron job, create the cron job so that it runs daily.
 

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,532
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.
 

lolfust1

Verified User
Joined
Oct 24, 2015
Messages
41
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?
 
Top