3 # btrfs-mksnapshot-rootfs -- Make snapshots of root filesystems ("/")
4 # Copyright (c)2014 Alexander Barton (alex@barton.de)
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
16 echo "Usage: $NAME"; echo
22 if [ -n "`fgrep ' / btrfs ' /etc/fstab 2>/dev/null`" ]; then
23 if [ -x /usr/local/sbin/btrfs-mksnapshot ]; then
24 /usr/local/sbin/btrfs-mksnapshot -1 / || exit 1
26 echo "\"/usr/local/sbin/btrfs-mksnapshot\" not executable, snapshot creation skipped."
29 echo "Root filesystem is not ot type \"btrfs\", snapshot creation skipped."