[conspire] PING (Partimage Is Not Ghost) -- Backup and Restore Disk Partitions

Rick Moen rick at linuxmafia.com
Fri Feb 22 14:45:30 PST 2008

Quoting David Fox (dfox94085 at gmail.com):

> I know Bruce has been doing some partition saving and restoring lately
> on his various laptops. Me, I've  not gone that route - the few times
> in the past when I needed (or wanted) to have partitions moved
> elsewhere (for instance, /home on hda1 instead of somewhere else) I
> made sure I had a place that was big enough to hold the whole
> partition, and then I'd do something like;
> cd dir; tar cvf - | (cd /mnt/somewhere; tar xf -)

Yes, I agree with you, that your general method (file-by-file copying)
is almost always what one _really_ should do, and that, by contrast,
making a binary image of a filesystem is almost always solving the wrong

I have a feeling that the prevalence of Symantec Ghost among members of
the computing public has conditioned people to tend towards solving the
wrong problem, in such situations.

You might consider:

$ ( cd dir && tar Scpf - . ) | ( cd /mnt/somewhere && tar Sxvpf - )

The "&&" is because you really don't _want_ the tar command to proceed
unless the related "cd" works.  The "S" means handle sparse files
efficiently.  "p" is preserve permissions.  "v" is verbose reporting.

If copying files across an ssh tunnel, you might want to also add "z"
(gzip compression) on both sides.


$ ( sleep 10; cd dir && tar Sczpf - . ) | ssh username at newhost 'cd /mnt/somewhere && tar Sxvzpf -'

More information about the conspire mailing list