/[sysadmin-cookbook]/recepies/btrfs/mksnap
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /recepies/btrfs/mksnap

Parent Directory Parent Directory | Revision Log Revision Log


Revision 197 - (hide annotations)
Sun Mar 28 20:54:15 2010 UTC (14 years, 1 month ago) by dpavlin
File size: 254 byte(s)
make hourly snapshots

1 dpavlin 197 #!/bin/sh -x
2    
3     mnt=$1
4     rootfs=$mnt/rootfs
5     snap=$mnt/.snap/
6     date=`date +%Y-%m-%dT%H`
7     btrfsctl=/usr/local/bin/btrfsctl
8    
9     test -d $rootfs || exit 1
10     test -d $snap || mkdir $snap
11    
12     test -d $snap/$date && $btrfsctl -D $date $snap
13    
14     $btrfsctl -s $snap/$date $rootfs

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26