Results 11 to 12 of 12
The following script is my backup script, here can you also tell what to backup.
have fun
Jan
#!/bin/bash
#
# creates backups of essential files
#
DATA="/home /root "
...
- 04-27-2011 #11Just Joined!
- Join Date
- May 2008
- Posts
- 9
The following script is my backup script, here can you also tell what to backup.
have fun
Jan
#!/bin/bash
#
# creates backups of essential files
#
DATA="/home /root "
CONFIG="/etc /var/lib /var/named "
LIST="/tmp/backlist_$$.txt"
#
# mount /mnt/backup
set $(date)
#
if test "$1" = "Sun" ; then
# weekly a full backup of all data and config. settings:
#
tar cfz "/uitpak/backups/full/data_full_$6-$2-$3.tgz" $DATA
rm -f /uitpak/backup/full/data_diff*
#
tar cfz "/uitpak/backups/full/config_full_$6-$2-$3.tgz" $CONFIG
rm -f /uitpak/backup/full/config_diff*
else
# incremental backup:
#
find $DATA -depth -type f \( -ctime -1 -o -mtime -1 \) -print > $LIST
tar cfzT "/uitpak/backups/data_diff_$6-$2-$3.tgz" "$LIST"
rm -f "$LIST"
#
find $CONFIG -depth -type f \( -ctime -1 -o -mtime -1 \) -print > $LIST
tar cfzT "/uitpak/backups/config_diff_$6-$2-$3.tgz" "$LIST"
rm -f "$LIST"
fi
#
# create sql dump of databases:
# mysqldump -u root --password=mypass --opt mydb > "/uitpak/backup/mydb_$6-$2-$3.sql"
# gzip "/uitpak/backup/mydb_$6-$2-$3.sql"
#
#umount /mnt/backup
- 04-27-2011 #12Just Joined!
- Join Date
- Apr 2011
- Posts
- 6
Wow Looks very complicated haha.
Which parts do I need to edit? & Does the script run automatically at a certain point...probably easiest to say what I need. Basically, i need to make the server or network backup to an external hard drive once a day around 5pm, but only 2 of the information bays need to be backed up, otherwise it will take too long.
Then this external hard drive can be taken off site and then brought back the next day to be backed up again. Do you know a way in which this is possible?
Also might seem a bit off topic, but do you know I can register for an account on the SME Server forums? When you make a username it asks for the name of the logo of contribs...
Thanks once again,
Sav


Reply With Quote