We'd like to remind Forumites to please avoid political debate on the Forum... Read More »
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
Comments
-
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 scriptBACKUPDIR="/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_links0
This discussion has been closed.
Confirm your email address to Create Threads and Reply

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