Results 1 to 2 of 2
Hi,
I'm looking to set up backups on my linux box. I'm looking now at the two scripts below. If you know of any more well known & tested backup ...
- 07-13-2008 #1
well known backup scripts? (using rsynch)
Hi,
I'm looking to set up backups on my linux box. I'm looking now at the two scripts below. If you know of any more well known & tested backup scripts than these can you let me know?
* rsnapshot
* HOWTO: Backup nightly via rsync
Thanks
- 07-14-2008 #2Linux Newbie
- Join Date
- Jun 2008
- Location
- Georgia, USA
- Posts
- 117
Hello callaga:
Here is one of my scripts I use to backup the etc directory on my servers:
#!/bin/bash
# Set a value that we can use for a datestamp
DATE=`date +%Y-%m-%d`
# Our Base backup for home directories
BOX="serverIP"
BASEBACKUP="/opt/backup-dir/$BOX/full-backups/etc"
# This is where we throw our backups.
# Test to see if our backup directory exists.
# If not, create it.
if [ ! -d $BASEBACKUP ]
then
mkdir -p $BASEBACKUP
fi
tar cvzpf etc-$DATE.tar.gz /etc
mv etc-$DATE.tar.gz $BASEBACKUP
Just change "serverIP" for either your server's IP or its host name.
This script does a full backup of this directory.
The next one is for incremental backups of this directory:
#!/bin/bash
DATE=` /bin/date +%m%d%Y-%H%M`
find /etc -type f -mtime -1 | xargs \
tar cvzpf
/opt/backup-dir/serverIP/incremental-backups-$DATE.tar.gz
The script for incremental backups backs up all the files that have changed in the /etc directory within the past 24 hours.
I hope this helps.Thanks.
--Willie
If there was no Linux, my life would not be complete.


Reply With Quote
