TARing a full system

Hi,

I'm gonna need a backup of one of my systems to RAID the disk with another one for automatic backup. For convenience, and by looking at my current setup, I'd like to create an archive of my entire system to uncompress it later when the RAID is setup. I know that doing so blindly will just put TAR in a loop when trying to process some folders. So I'd like your wise judgements on the best possible way(s) of doing so in a clean and efficient fashion. Basically, I want to compress my system in a single archive so that when everything is ready I can uncompress it from root and replace the clean new system with the old one.

If there are better ways of achieving this, I'm listening to all suggestions :)
 
Hi, thank you very much for your reply. I'm trying the "dump" command ( dump -C16 -b64 -0uanL -h0 -f /usr/backup/root.dump /), but I systematically get an error:

Code:
DUMP: WARNING: Cannot use -L on an unmounted filesystem.
dump: /: unknown file system

I'm using a ZFS filesystem. Maybe it's the reason the dump fails ?
 
bsdkeith said:
If you do use tar, you can use the exclude option to not include files or directories.
Yeah I know, but I never succeeded in using it. The quotes for the exclude parameters are different between systems for instance, and other subtleties I never quite mastered. If I'd use TAR, I'd try to find a how to somewhere, but didn't find one that work. I always end up in a loop :/
 
bitsandnumbers said:
Code:
DUMP: WARNING: Cannot use -L on an unmounted filesystem.
dump: /: unknown file system

I'm using a ZFS filesystem. Maybe it's the reason the dump fails ?
As I don't use ZFS, I wouldn't know about this particular case. That being said, dump(8) supports using device-special files (e.g. /dev/ada0s1a).

bitsandnumbers said:
bsdkeith said:
If you do use tar, you can use the exclude option to not include files or directories.
Yeah I know, but I never succeeded in using it. The quotes for the exclude parameters are different between systems for instance, and other subtleties I never quite mastered.
tar --exclude='some directory' ... does that. You may also be interested in the --one-file-system option.

~~~~

bsdkeith said:
If you do use tar, you can use the exclude option to not include files or directories.
dump(8) also supports exclusion through file flags: chflags nodump /usr/src.
Check dump(8)'s "honor level" -h option.
 
Back
Top