Find the answer to your Linux question:
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 ...
  1. #1
    Just Joined! callagga's Avatar
    Join Date
    Jan 2008
    Posts
    15

    Question 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

  2. #2
    Linux 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •