Cron For backing up DA

dumb4ever

New member
Joined
Aug 8, 2007
Messages
2
Question:
1. How can i backup DA 2 times a week using cron ? ( maybe around 3.15 AM every Monday and Friday )
2. Is it possible to delete old backups automatically ( keep the last 3 backup only )



I tried searching but not many provide a clear solution for a non-linux users.


Thanks
 
Which method are you going to use to backup DirectAdmin?

If you're using Admin Backup/Transfer, you can set up multiple cronjobs right there in the admin control panel. Be sure to save them in different locations.

If you're using System Backup, you can only store one backup in the control panel, but you can create cronjobs manually. However you'd have to manipulate the configuration file between backups to save to different paths.

You can create cronjobs to change directory names and even delete directories; for example you can run a cronjob twice a week which does this:

1) deletes the directory [oldestbackup]
2) uses mv to move the directory olderbackup to oldestbackup
3) uses mv to move the directory currentbackup to olderbackup
4) creates as noew the directory currentbackup

Jeff
 
Thank You for your reply, but i'm not sure what you mean by Admin Backup/Transfer or System Backup ??

I'm just a user ( cannot add user, or install my own skin ) and the only way i can do backup is thru the "Create/Restore Backups" from DA.

and inside the Cron menu I only see the Date and Command text box ?

Thanks again for the reply.
 
joining to this question.
I have 2 hardisks in my server and one of them have 40GB for backups..

wonder how can I setting the da to do a backup every midnight and store the new backup, I mean only 1 backup and not the old..

Cheers.
 
Thank You for your reply, but i'm not sure what you mean by Admin Backup/Transfer or System Backup ??

I'm just a user ( cannot add user, or install my own skin ) and the only way i can do backup is thru the "Create/Restore Backups" from DA.
Sorry; you confused me by asking how to backup DirectAdmin (DA), which I consider to mean the entire server.
and inside the Cron menu I only see the Date and Command text box ?
Are you asking how to write cronjobs? Whole books have been written on that ;) .

You can certainly backup using the DirectAdmin control panel. The backups are restored in ~/backups.

The current backup is stored in ~/backups/backup

Unfortunately the DirectAdmin backup itself cannot be run through a cronjob.

You can certainly create your own backup script. Or have someone create it for you. It will NOT be able to back up anything created as user apache. It may not be able to back up email; it can only back up email if it's stored in what's called the Maildir format.

You should probably contact your hosting company.

Jeff
 
joining to this question.
I'm not sure why; it appears to be a completely different question.
I have 2 hardisks in my server and one of them have 40GB for backups..

wonder how can I setting the da to do a backup every midnight and store the new backup, I mean only 1 backup and not the old..
The DirectAdmin system backup can be set to do that.

Jeff
 
Back
Top