[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: An experiment in backup



On Thu, Jan 15, 2015 at 09:32:24PM -0800, Kevin O'Gorman wrote:
> I care because I like to have a lot of free space in my partitions, but I
> hate to use backup time and space on the holes.

Hi Kevin,

If you copy the whole partition, byte-for-byte, as with the
'dd' command, you copy everything, including the free space.

If you copy via the filesystem, e.g. using rsync, you just
pay for what you use, and all the files are immediately
available. Restoring a file is a matter of 
copying.

My big files are video, which don't compress well, and I
backup to disk, not tape, so I see no benefit from using
tar. 

btw, like many others, I've written various backup scripts
over the years. Lately, I've just done full backups, one for
/home, one for everything else.  My case is simple, because
everything is in one partition. I exclude some directories,
and after making the backup, create them in the backup
directory.

#!/bin/sh
RSYNC="rsync -avx "
CMD="$RSYNC \
	--exclude /dev \
	--exclude /proc \
	--exclude /sys  \
	--exclude /home \
	--exclude /tmp \
	--exclude /var/cache/apt/archives \
	--exclude /var/run \
/ /mnt/$1/root" 
echo $CMD >> /var/log/backup.log

for dir in dev proc sys home tmp var/run var/cache/apt/archives ; do mkdir /mnt/$1/root/$dir; done

This script doesn't address permissions. (/tmp usually gets
1777.) 

I haven't tested it lately. However you can see to work if
/dev /proc and /sys get populated on boot, you should have
everything you need.  The most likely booting issues for me are
usually something in /etc/fstab.

However, I'm thinking to move over to a Time Machine style
rsync backup based on hardlinks.

have fun,


-- 
Joel Roth
  


Reply to: