So far I am loving this app, However I noticed that in this tutorial/HowTo -> http://www.urbackup.org/client_debian_ubuntu_install.html, number 7 shows how to have a script to help with consistent backups using snapshots. But he put in there BTRFS and I use LVM so I was wondering if anyone had some insight on the commands to run that would work for LVM.
ex: btrfs subvolume delete /mnt/snap_root
Do I just use normal file commands to deal with this or do I use LVM commands and do you have an example?
Here are my two files for LVM2, I am no expert but this is doing the trick for me. You need to change sizes of LVM2 snapshots if your originals are smaller than the size I am specifying for snapshots. Files need to be executable
/etc/urbackup/prefilebackup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#!/bin/bash
if [ $(mount | grep -c /mnt/snaps/home) == 1 ]
then
/bin/umount /mnt/snaps/home
fi
if [ $(mount | grep -c /mnt/snaps/opt) == 1 ]
then
/bin/umount /mnt/snaps/opt
fi
if test -b /dev/rabbit/opt-snap
then
/sbin/lvremove /dev/rabbit/opt-snap -f
fi
if test -b /dev/VolGroup/home-snap
then
/sbin/lvremove /dev/VolGroup/home-snap -f
fi
lvcreate -s /dev/VolGroup/home -L10G -n home-snap
lvcreate -s /dev/VolGroup/opt -L5G -n opt-snap
mount /dev/VolGroup/home-snap /mnt/snaps/home -o ro
mount /dev/VolGroup/opt-snap /mnt/snaps/opt -o ro
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/etc/urbackup/postfilebackup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#!/bin/bash
/bin/umount /mnt/snaps/home
/bin/umount /mnt/snaps/opt
/sbin/lvremove /dev/VolGroup/home-snap -f
/sbin/lvremove /dev/VolGroup/opt-snap -f
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~