I'm posting just to share with you this:
On my M4 I've finally installed / on btrfs and grub2 boot this setup, everything's working as supposed.
- Code: Select all
cat /etc/fstab
# Entry for /dev/sda5 :
UUID=9d78b470-3922-4fa8-80e3-2c5658xxxxxx / btrfs noatime 1 1
We'll try to create snapshots, that's being the main purpose of using btrfs:
- Code: Select all
$ sudo btrfs subvolume snapshot / /_snaphot_test
$ sudo btrfs subvolume list -a /
ID 313 gen 15625 top level 5 path _snaphot_test
All good, now let's add an extra line at the begining (2nd line is just perfect) of /usr/sbin/urpmi, /usr/sbin/urpme and /usr/libexec/drakrpm:
- Code: Select all
system ("/usr/sbin/btrfs subvolume snapshot / /media/backups/root_`date +%Y_%m_%d_%H_%M`");
this will put a snapshot in /media/backups/ every time we run urpmi/urpme or gurpmi
Warning: every time an update to (g)urpmi is pushed, we'll have to edit those 3 files and make sure we readd that line into them! I's not a perfect suystem, but untill (g)urpmi will get real support for btrfs snapshot, this little trick will do it's job.
Of course, if we want to delete snapshots, we'll just do a:
- Code: Select all
$ sudo btrfs subvolume delete /_snaphot_test
Delete subvolume '//_snaphot_test'
That's it, enjoy installing and removing packages without fear of losing anything and without waiting for a full backup to finish!
PS: btrfs snapshot is NOT replacing the backup! A hdd failure, or losing your laptop will render unavailable all your btrfs snapshots - keep doing your backups!