Results 1 to 10 of 10

Thread: Backup rotation?

  1. #1
    Join Date
    Oct 2015
    Posts
    30

    Exclamation Backup rotation?

    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?

  2. #2
    Join Date
    Jul 2019
    Posts
    44
    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 by xerox; 09-06-2019 at 05:39 PM.

  3. #3
    Join Date
    Oct 2015
    Posts
    30
    its a server with access with just ftp, so how could i do that

  4. #4
    Join Date
    Apr 2009
    Posts
    2,387
    Quote Originally Posted by lolfust1 View Post
    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

  5. #5
    Join Date
    Oct 2015
    Posts
    30
    Thank trying it, will update,
    will it let users and users of reseller restore backups?

  6. #6
    Join Date
    Oct 2015
    Posts
    30
    Quote Originally Posted by ditto View Post
    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?

  7. #7
    Join Date
    Apr 2009
    Posts
    2,387
    You only need to create one cron job, create the cron job so that it runs daily.

  8. #8
    Join Date
    Oct 2015
    Posts
    30
    Quote Originally Posted by ditto View Post
    You only need to create one cron job, create the cron job so that it runs daily.
    buts its says sundays, so it will run backups only on sundays?

  9. #9
    Join Date
    Apr 2009
    Posts
    2,387
    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.

  10. #10
    Join Date
    Oct 2015
    Posts
    30
    Quote Originally Posted by ditto View Post
    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •