Skip to content

scsi/snapshot-btrfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snapshot-btrfs

snapshot-btrfs is a tool offer btrfser eazier way to do daily snapshot work. It's merges some code and ideal from https://github.com/mk01/btrfs-auto-snapshot. But they use different base way to manage snapshot.

snapshot-btrfs only focus on those btrfs subvolumn which currently mount on system. Eeach subvolumn has a directory .btrfs to save individual setting and snapshot. For management reason, it create readonly snapshot to prevent careless mody to snapsot. Before auto-snapshot command work. You moust run mark-auto to tell snapshot-btrffs to incldue this mount point when doing auto-snapshot.

Just like btrfs-autosnapshot and zfs-autosnapshot, It use crontab to invoke program for daily automatic snapshot. Different crontab implement has little different from setting and working. You should check if snapshot-btrfs work currently for your system or do some fix from snapshot-btrfs.cron to suit your system.

Usage: ./snapshot-btrfs command [options] [name...]

command            Is one of 
                         auto-snapshot, snapshot ,delete-snapshot,clear-snapshot
                         mark-auto, unmark-auto, show-auto-mark
                        
-d, --debug        Print debugging messages.
-n, --dry-run      Print actions without actually doing anything.
-h, --help         Print this usage message.
-k, --keep=NUM     Keep NUM recent snapshots and destroy older snapshots.
-l, --label=LAB    LAB is usually 'hourly', 'daily', or 'monthly' (default
                   is 'regular').
-p, --prefix=PRE   PRE is 'snap' by default.
-e, --name         Snapshot name. If specified, -l and -p are overridden
                   and --keep is not considered.
-q, --quiet        Suppress warnings and notices at the console.
-s, --syslog       Write messages into the system log.
-v, --verbose      Print info messages.

name               Mount point path, or empyt for all mount point.