wok diff btrfs-progs/stuff/btrfs-snapshot @ rev 13572

Up jabberd2 (2.2.16)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Nov 04 18:18:29 2012 +0100 (2012-11-04)
parents 09fb684d4984
children 9584476eeb17
line diff
     1.1 --- a/btrfs-progs/stuff/btrfs-snapshot	Sun Oct 14 18:03:37 2012 +0200
     1.2 +++ b/btrfs-progs/stuff/btrfs-snapshot	Sun Nov 04 18:18:29 2012 +0100
     1.3 @@ -1,7 +1,10 @@
     1.4  #!/bin/sh
     1.5  
     1.6 -# Keep last 30 daily snapshot with crontab
     1.7 -#0 0 * * * /usr/bin/btrfs-snapshot 30
     1.8 +# Keep last 30 daily snapshots with crontab
     1.9 +#0 * * * * /usr/bin/btrfs-snapshot 5  -hourly
    1.10 +#0 0 * * * /usr/bin/btrfs-snapshot 30 -daily
    1.11 +#0 0 1 * * /usr/bin/btrfs-snapshot 12 -monthly
    1.12 +#0 0 1 1 * /usr/bin/btrfs-snapshot 99 -yearly
    1.13  
    1.14  btrfs_list()
    1.15  {
    1.16 @@ -10,7 +13,7 @@
    1.17  }
    1.18  
    1.19  which btrfs > /dev/null && for root in $(btrfs_list) ; do
    1.20 -	dir=${root%/}/.snapshots
    1.21 +	dir=${root%/}/.snapshots$2
    1.22  	[ -d $dir ] || mkdir $dir
    1.23  	cd $dir
    1.24  	i=0