We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

Sourcing reliable server

Options
2»

Comments

  • tronator
    tronator Posts: 2,859 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    Searcher2 wrote: »
    He does use rysnc to do incremental backups but the issue is if you discover a file has got corrupt and it got corrupted 3 months ago (for example) so he wants to be able to go back to when it wasn't corrupt.

    This will be no problem with my method. This is a snippet of my backup script
    BACKUPDIR="/mnt/data/backup/"
    DATE=`date +%y%m%d`

    SOURCES="/boot/ /etc/ /home/ /usr/local/bin/" # !!!IMPORTANT!!! directories must end with /
    RSYNC="--delete"
    LASTBACKUP=`ls -d $BACKUPDIR | sort -r | grep -v lost+found | head -1 `
    for SOURCE in `echo $SOURCES`
    do

    if [ "$LASTBACKUP" ]; then
    INC="--link-dest=$LASTBACKUP$SOURCE"
    fi
    mkdir -p $BACKUPDIR$DATE$SOURCE # create directories without error control
    rsync -avzP $RSYNC $INC $SOURCE $BACKUPDIR$DATE$SOURCE
    done

    You can delete any backup and still have a complete backup in any other backup folder.

    http://en.wikipedia.org/wiki/Hard_links
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 351K Banking & Borrowing
  • 253.1K Reduce Debt & Boost Income
  • 453.6K Spending & Discounts
  • 244K Work, Benefits & Business
  • 598.8K Mortgages, Homes & Bills
  • 176.9K Life & Family
  • 257.3K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.