Other interesting project might help to improve fsarchiver

Please ask questions here if you are not familiar with fsarchiver
Post Reply
bobbysch
Posts: 26
Joined: Mon Jun 15, 2009 8:46 pm

Other interesting project might help to improve fsarchiver

Post by bobbysch » Sun Nov 01, 2009 1:28 am

Hello,
In my working place, we use a very interesting and amazing tool called imagezip (can easily to be compiled statically) to clone ourLinux machines : RHEL2,3,4,5 , Debain ... (production machines included). Amazingly it can clone even LVM PV.
Unfortunately it is not maintained since 2005 and is much more less flexible than fsarchiver.

Maybe you can take a look at this code source and I hope that can improve fsarchiver more.

Here is a tiny description of imagezip

imagezip
Imagezip is a filesystem aware disk image maker. It supports Linux/BSD/NTFS/FAT, and will only store used data. The disk does NOT need to have free space zeroed, unlike the previous imager implementation. With unknown filesystems, imagezip reverts to raw processing, and will need unused space zeroed for optimal compression.
Imagezip performs intelligent compression of the data - in addition to only storing used disk space, it compresses data while storing it.
The output from imagezip can either be a file, or stdout. In the implementation we use, it dumps to stdout, which is piped to curl to place the data in a file on an FTP server, without needing NFS mounts or such.
The output file format from imagezip is suitable for use with imageunzip or frisbeed without any modifications.

Hopefully that can help you.

bobbysch
Posts: 26
Joined: Mon Jun 15, 2009 8:46 pm

Re: Other interesting project might help to improve fsarchiver

Post by bobbysch » Sun Nov 01, 2009 4:44 pm

I forgot the link of the source code :
http://www.emulab.net/downloads/emulab-080630.tar.gz

tar xvfz emulab-080630.tar.gz ; cd testbed-080630/os/imagezip/

Some modification to exclude ntfs support for compilation without errors.

alexpacio
Posts: 6
Joined: Fri Aug 28, 2009 7:35 pm

Re: Other interesting project might help to improve fsarchiver

Post by alexpacio » Sun Nov 01, 2009 6:09 pm

What about the usage of the program?

bobbysch
Posts: 26
Joined: Mon Jun 15, 2009 8:46 pm

Re: Other interesting project might help to improve fsarchiver

Post by bobbysch » Sun Nov 01, 2009 9:54 pm

Very simple, here are some exemple :
# imagezip /dev/sda /mnt/sda.imagezip
or using stdout output :
# imagezip /dev/sda - | ...

Restoring via network
#ssh machine "imageunzip - /dev/sdb" < /mnt/sda.imagezip


imagezip usage :
# imagezip
usage: imagezip [-vihor] [-s #] <image | device> [outputfilename]
-v Print version info and exit
-i Info mode only. Do not write an output file
-h Print this help message
-o Print progress indicating dots
-r Generate a `raw' image. No FS compression is attempted
-s slice Compress a particular slice (DOS numbering 1-4)
image | device The input image or a device special file (ie: /dev/ad0)
outputfilename The output file ('-' for stdout)

Advanced options
-z level Set the compression level. Range 0-9 (0==none, default==4)
-I slice Ignore (skip) the indicated slice (not with slice mode)
-R slice Force raw compression of the indicated slice (not with slice mode)
-c count Compress <count> number of sectors (not with slice mode)
-D Do `dangerous' writes (don't check for async errors)
-1 Output a version one image file
-H hashfile Use the specified imagehash-generated signature to produce a delta image

Debugging options (not to be used by mere mortals!)
-d Turn on debugging. Multiple -d options increase output
-b FreeBSD slice only. Input must be a FreeBSD FFS slice
-l Linux slice only. Input must be a Linux EXT2FS slice
-n NTFS slice only. Input must be an NTFS slice
-S DOS-ptype Treat the input device as containing a slice of the given type


imageunzip usage :
# imageunzip
usage: imageunzip options <input filename> [output filename]
-v Print version info and exit
-s slice Output to DOS slice (DOS numbering 1-4)
NOTE: Must specify a raw disk device.
-D DOS-ptype Set the DOS partition type in slice mode.
-z Write zeros to free blocks.
-p pattern Write 32 bit pattern to free blocks.
NOTE: Use -z/-p to avoid seeking.
-o Output progress indicator (compressed chunks processed)
-O Output progress indicator (GBs of uncompressed data written)
-n Single threaded (slow) mode
-d Turn on progressive levels of debugging
-r retries Number of image read retries to attempt
-W size MB of memory to use for write buffering

admin
Site Admin
Posts: 550
Joined: Sat Feb 21, 2004 12:12 pm

Re: Other interesting project might help to improve fsarchiver

Post by admin » Sun Nov 01, 2009 10:48 pm

I suspect this tool is working a very different way, and then it won't be possible to reuse these ideas in fsarchiver. For instance fsarchiver use the filesystem support in the kernel to read a partition. It that tool can work on LVM Physical-Volumes it means it does not work at the file level.

Post Reply