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

Re: An experiment in backup




On 01/16/2015 01:28 AM, Joel Roth wrote:
> 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.
> 
> ...
> 
> #!/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
> 
I can confirm that the above works. I recently used rsync to copy my
live system to another partition, excluding /dev /proc /sys /tmp and /home.

After setting grub to boot the new partition, it works fine. I'm using
it now.

-Thom


Reply to: