[CentOS] resize an image file

Wed Nov 21 18:44:49 UTC 2007
John R Pierce <pierce at hogranch.com>

Jerry Geis wrote:
> I have a 100G disk on an old redhat 7.3 system.
>
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/hda1             9.6G  2.4G  6.7G  27% /
> /dev/hda3              99G  6.1G   88G   7% /home
> hda2 is 2G swap
>
> I am trying to back that complete image up on my centos 5 system.
> I can do the dd if=/dev/hda bs=1M | ssh root at machine 'cat > disk.img'
> which gets me the whole 100G.


tar czlf - / /home | ssh root at machine 'cat > disk.tar.gz'

(-l so tar doesn't cross file systems and try to backup /proc)