[tech] meito (the new fileserver)

David Luyer david at luyer.net
Thu Aug 29 22:06:58 WST 2002


> > Luyer's favourite: install GNU tar/cpio (already on morwong) and
> > "tar cf - ... | cpio -im". I still like dump, but I can't actually
> > see a /sbin/advfsdump or similar installed at the moment... Odd.

Actually not my favourite anymore.  I just use cpio exclusively.
tar to cpio was only good for certain OS combinations where it would
happen to preserve long file-names, cpio does it properly almost
always.

    (cd $input; find . -print) | (cd $output; cpio -im)

Insert ssh, files, whatever as appropriate.

Or on the same machine (eg. if using nfs... but ssh -c none or
ssh -c blowfish are probably faster than nfs) read the man page
on 'cpio -pm', it's even easier, think it's:

    cd $input; cpio -pm $output

And if you're doing a migration with test phases, rsync.  rsync
rocks.  As an example, here's how I back up my entire laptop:

#!/bin/sh
cd /
rsync --exclude /dev/fd --numeric-ids --force --delete \
   -e 'ssh -c blowfish' -axvrRlHpogDtS . backuphost:backuppath

rsync doesn't always get links 100% right in some cases, so cpio
is better if you're doing a once-off copy.

David.




More information about the tech mailing list