Esta utilidad esta incluida en el livecd SystemRescue
Lo de siempre cambiar la boot sequence desde la bios para arrancar desde la unidad lectora de cd/dvd.
Crear un directorio para montar la partición en la que se guardará el archivo de imagen, (en mi caso /dev/sda6):
root@sysresccd /root % mkdir imagen
Luego:
root@sysresccd /root % mount /dev/sda6 /root/imagen
Para ver el listado de los sistemas de archivos detectados:
root@sysresccd /root % fsarchiver probe simple
[=====DEVICE=====] [==FILESYS==] [=====LABEL=====] [====SIZE====] [MAJ] [MIN]
[/dev/sda1 ] [ext4 ] [ubunturoot] [ 14.82 GB] [ 8] [ 1]
[/dev/sda3 ] [ext4 ] [ubuntu_home] [ 21.42 GB] [ 8] [ 3]
[/dev/sda5 ] [swap ] [ ] [ 4.38 GB] [ 8] [ 5]
[/dev/sda6 ] [ext4 ] [UTILS ] [ 16.16 GB] [ 8] [ 6]
[/dev/sda7 ] [ext3 ] [archlinux] [ 8.01 GB] [ 8] [ 7]
[/dev/sda8 ] [ext3 ] [archlinux_home ] [ 9.02 GB] [ 8] [ 8]
Crear imagen de la particion /dev/sda1 (sistema de archivos ext4):
root@sysresccd /root % fsarchiver -v savefs /root/imagen/ubunturoot.fsa /dev/sda1
Al finalizar verá algo como esto:
Statistics for filesystem 0 * files successfully processed:...regfiles=149160, directories=17177, symlinks=46007, hardlinks=12, specials=130 * files with errors:....................regfiles=0, directories=0, symliks=0, hardlinks=0, specials=0
Para obtener información del archivo:
root@sysresccd /root/imagen % fsarchiver archinfo /root/imagen/ubunturoot.fsa
====================== archive information ====================== Archive type: filesystems Filesystems count: 1 Archive id: 4a8e7198 Archive file format: FsArCh_001 Archive created with: 0.5.8 Archive creation date: 20090821-10:57:26 Archive label: archive-label Compression level: 3 (gzip level 6) Encryption algorithm: none ===================== filesystem information ==================== Filesystem id in archive: 0 Filesystem format: ext4 Filesystem label: Filesystem uuid: 17cd5f7e-6278-4b02-ac40-60ef27862bfb Original filesystem size: 14.59 GB (15665754112 bytes) Space used in filesystem: 4.39 GB (4712210432 bytes)
root@sysresccd /root/imagen % ls
ubunturoot.fsa
Restaurar la imagen previamente creada será tan sencillo como teclear:
root@sysresccd /root/imagen % fsarchiver restfs /root/imagen/ubunturoot.fsa id=0, dest=/dev/sda1
Comandos y argumentos de fsarchiver:
root@sysresccd /root % fsarchiver
the first argument must be a command.
====> fsarchiver version 0.5.8 (2009-07-12) - http://www.fsarchiver.org <==== Distributed under the GPL v2 license (GNU General Public License v2).
* usage: fsarchiver [
* savefs: save filesystems to an archive file (backup a partition to a file)
* restfs: restore filesystems from an archive (overwrites the existing data)
* savedir: save directories to the archive (similar to a compressed tarball)
* restdir: restore data from an archive which is not based on a filesystem
* archinfo: show information about an existing archive file and its contents
* probe simple|detailed: show list of filesystems detected on the disks
-o: overwrite the archive if it already exists
-v: verbose mode (can be used several times to increase the level of details)
-d: debug mode (can be used several times to increase the level of details)
-A: allow to save a filesystem which is mounted in read-write (live backup)
-a: allow to run savefs when partition mounted without the acl/xattr options
-z
-s
-j
-c
-h: show help and information about how to use fsarchiver with examples
-V: show program version and exit
Support for optional features: (enabled or disabled during compilation):
* support for lzo compression:............yes
* support for lzma compression:...........yes
* support for encryption:.................yes
Warnings:
* fsarchiver is still in development, don't use it for critical data yet.