Cronned backups on specified path

jep

Verified User
Joined
Nov 12, 2003
Messages
79
Hi,

For my backups I have a NFS volume on (for example) /backups. How can i make my directadmin backups over here instead of the normal path? Or do I have to make symlinks or something? What is the easyest and best way?

And: Can i automate a nice backup from the whole directadmin structure? Like: when a server crashes i want to put a backup back. What is the easyest way?

Some tips please ;)
 
Hello,

You could probably symlink the backups directory to your own. This can be accomplished when you create a user by using this feature:
http://www.directadmin.com/features.php?id=183

so after a User is created, you can go in, remove the /home/username/backups directory (if it exists) and link it to whereever you need. Just remember that the User is chrooted in his filemanager, so he won't be able to download his backups.

Have a look at
http://www.directadmin.com/paths.html
for a listing of all important files.

John
 
Here is a little script I run from cron every night to backup modified files to a directory that I later download to a backup server. On the backup server, I then uncompress and untar the backups after about 2 days, just in case a critical file was deleted/modified, I still have a copy of a good one for a couple of days.

Code:
#!/bin/sh
BACKDIRS="etc home usr/local/ var/www var/named var/lib/mysql usr/sbin usr/lib/apache"
BACKUPLIST="/tmp/backuplist.$$"
BACKUPFILE="/home/xxx/backups/back_$(date '+%Y_%m_%d').tar.bz2"
cd /
find ${BACKDIRS} \( -type f -o -type l -o -type s -o -type p \) -mtime -1 -depth -print | grep -v mysql.sock|grep -v xxx.backups > ${BACKUPLIST}
tar --create --bzip2 --files-from=${BACKUPLIST} --file=${BACKUPFILE}
rm -f ${BACKUPLIST}
 
Back
Top