Site Sponsors:
Backing Up Files Across Multiple Devices 
There you have them - sitting in a box. --From lots of CDs / DVDs, to far too many USB sticks to contemplate.

Rather than sitting there - waiting for us to toss them out - wouldn't it be nice if we could use them to backup our 'stuff?

Backup Splits

Much like in the days when we had lots of drive-tapes, the challenge is to split a `too-big` collection of files, across a `too-small` series of media. A problem almost as old as computing itself, fortunately all POSIX systems come with a program called `tar`!

sudo mkdir /d_backup 2> /dev/null
sudo chmod 777 /d_backup
cp $0 /d_backup
cd /d_backup
name=`date +d_drive_%Y_%j.tar`
echo Creating $name from $0
tar -cf ./$name /d_drive/
split -d -b 4480m ./$name

In the above, my task is to routinely back-up /d_drive into a folder named /d_backup. Once created, I want to split a julian-dated backup file into 4GB slices, from there to manually burn them out to a 2nd generation DVD drive. (*)

Splits Restored

To restore the files, all we need do is to (1) undo the `split,` by copying (2) all of the media-content to the hard drive, then (3) un-tar the concatenation:

cat * > d_drive.tar
tar xvf d_drive.tar

(*) Note that while the above `split` uses 4480 for the splits, that one should adjust the size to match the least-common size-denominator for any and all external media.

Sharing is caring!


[ add comment ] ( 27 views )   |  permalink  |  related link

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Next> Last>>