Sauvegarder son système à chaud grâce à Mondorescue

MondoRescue

Installation

/etc/apt/sources.list.d/mondo.list

deb ftp://ftp.mondorescue.org//debian 7 contrib
deb-src ftp://ftp.mondorescue.org//debian 7 contrib

Utilisation

Exemple de sauvegarde en ligne de commande

#mondoarchive -OV -i -N -g -d /var/backup -T /var/tmp -S /var/tmp -E "/var/lib/mysql|/var/backup|/var/webapps" -s 4480m -p $HOSTNAME mondoarchive -k /boot/vmlinuz-$(uname -r) -OV -i -N -g -d /backup -T /tmp -S /tmp -E "/home|/media|/var/cache|/var/tmp|/run|/mnt" -s 4480m -p $HOSTNAME

Autre

i-want-my-lvm

/sbin/lvmdiskscan
/sbin/lvm
i=2
LVM version >= 2.0 found.
Just before you extrapolate mountlist to include RAID partitions,
extrapolate it to include the following LVM drives and partitions:-
>>>>> /dev/sda5
To get started, type:-
(insmod dm-mod)
(insmod dm_mod)
# lvm vgchange -an
# echo y | lvm pvcreate -ff /dev/sda5
# lvm vgscan
Create and activate the VG's (volume groups).
# lvm vgcreate root-vg -l 0 -p 0 -s 4.00m /dev/sda5
# lvm vgchange -a y root-vg
Finally, create the LV's (logical volumes).
# lvm lvcreate -L 4096m -r auto -n lv_root root-vg
# lvm lvcreate -L 1024m -r auto -n lv_swap root-vg
# lvm lvcreate -L 10240m -r auto -n lv_home root-vg
# lvm lvcreate -L 3072m -r auto -n lv_tmp root-vg
# lvm lvcreate -L 6144m -r auto -n lv_usr root-vg
# lvm lvcreate -L 6144m -r auto -n lv_var root-vg
# lvm lvcreate -L 12288m -r auto -n lv_opt root-vg
# lvm vgscan
Now you may format the LV's:-
(mkfs -t foo /dev/root-vg/lv_root or something like that)
(mkfs -t foo /dev/root-vg/lv_swap or something like that)
(mkfs -t foo /dev/root-vg/lv_home or something like that)
(mkfs -t foo /dev/root-vg/lv_tmp or something like that)
(mkfs -t foo /dev/root-vg/lv_usr or something like that)
(mkfs -t foo /dev/root-vg/lv_var or something like that)
(mkfs -t foo /dev/root-vg/lv_opt or something like that)
Finally, to shut down and delete the volumes, do this:-
(lvm lvremove -f /dev/root-vg/lv_root)
(lvm lvremove -f /dev/root-vg/lv_swap)
(lvm lvremove -f /dev/root-vg/lv_home)
(lvm lvremove -f /dev/root-vg/lv_tmp)
(lvm lvremove -f /dev/root-vg/lv_usr)
(lvm lvremove -f /dev/root-vg/lv_var)
(lvm lvremove -f /dev/root-vg/lv_opt)
(lvm vgchange -a n root-vg)
(lvm vgremove root-vg)
(rmmod dm-mod & rmmod dm_mod & )