View Single Post
  #4   (View Single Post)  
Old 14th October 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

you can dd it to output and compress it on the fly....
, however i prefer using dump and restore, they should be more way faster than dd, since they won't save unused space on hard drive....
also backup file will be smaller (and also can be compressed on the fly)
+ backup can be made for running filesystem, the only thing is it works only on UFS

to backup and compress
Code:
$ dump -0Lauf - /dev/ad4s1d | bzip2 -9 > /path/to/ad4s1d.bak.bz2
to uncompress and restore restore
note for this you will need some /tmp space, if tmp is to small it will fail, so you might need to link /tmp to bigger filesystem
Code:
$ newfs -U /dev/ad4s1d
$ mount /dev/ad4s1d /mnt
$ cd /mnt
$ bzcat /path/to/ad4s1d.bak.bz2 | restore -xf -
I think, tha sould do the trick....


read
man dump
man restore


also you can use this method to resize partitions
or clone FreeBSD among other PC's (you will need to copy MBR to all of them with dd)

Last edited by graudeejs; 14th October 2008 at 06:40 AM.
Reply With Quote