DirectAdmin Support said:another popular method of using the Reseller level backup is to create multiple remote (or local) ftp backups as cron jobs. Each one is set to run on a different day (eg, 7 per week, one for each day) and use a different path for each cron (sunday, monday, etc..). This would allow you to store the last 7 days (or however many you want), each with their own copies.
John
Nothing? A powerfull panel like DA doesnt support dated scheduled backup?
#!/bin/bash
homedir=/home
month=`date '+%m'`
day=`date '+%d'`
year=`date '+%Y'`
for users in $homedir/*; do
user=${users:6}
bkupdir=$users/user_backups
oldbkupfile=$user.tar.gz
newbkupfile=$year$month$day.$user.tar.gz
if [ -d $users ]; then
if [ -d $bkupdir ]; then
if [ -f $bkupdir/$oldbkupfile ]; then
mv $bkupdir/$oldbkupfile $bkupdir/$newbkupfile
fi
fi
fi
done
DA allows user (site owners) to create backups on demand, but not to schedule them.
2. User Level Backups
CMD_API_SITE_BACKUP
method can be GET or POST.
###################
#list current available backup files
domain=domain.com (hidden value, doesn't affect the outcome of the backup, but is required)
###################
#create a backup
action=backup
domain=domain.com (hidden value, doesn't affect the outcome of the backup, but is required)
for the following items, include whichever ones you wish to include in the backup. The format is select0=<b>item</b>, where you would use select1=<b>item2</b> for the next item, etc.
domain
subdomain
forwarder
autoresponder
vacation
list
emailsettings
ftp
ftpsettings
database
See the Actual user backup page to see what each item does.
###################
#restore a backup
action=restore
domain=domain.com (hidden value, doesn't affect the outcome of the backup, but is required)
file=filename.tar.gz
Include the desired items using the same select0=item technique as above. Use the action=view command from below to see what items are actually available to restore.
###################
#view a backup file's contained items.
action=view
domain=domain.com (hidden value, doesn't affect the outcome of the backup, but is required)
file=filename.tar.gz
returns a list of selectable items (see the above list )
another popular method of using the Reseller level backup is to create multiple remote (or local) ftp backups as cron jobs. Each one is set to run on a different day (eg, 7 per week, one for each day) and use a different path for each cron (sunday, monday, etc..). This would allow you to store the last 7 days (or however many you want), each with their own copies.
John
How many backups are you planning on keeping? If not more than 7 days then you could do as DA Support suggested above.
Another thing you can do is create a script that renames the backup a minute before the backup is supposed to run.
How do you do this? I don't see an option in the reseller level backup utility to change the path of a local user backup. The path seems to be hard-coded to /home/username/user_backups.