[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ezjail] Backing up a jail



On Aug 18, 2013, at 5:33 PM, Dan Langille wrote:

> I do like that idea.  Nothing wrong with keeping the snapshot around for a bit too.  I could script that snapshot as part of the 'before backup' and 'after backup' scripting that comes with Bacula.
> 
> Do you have anything like that already?


Have a look at http://www.freshports.org/sysutils/zfSnap

Having used ZFS for years now, I've come to not like anything else. :)  Its so easy clone/backup/restore/copy/bare metal install systems using ZFS.  Unfortunately my day job is all Linux, though I'm hoping I can get FreeBSD/SmartOS at some point.  I love Zones too.

I've setup a two node cluster using HAST and ZFS on top of that.  I use it as a backup cluster.  Its on old hardware so I know things will fail, sooner than later, so having the data on more spindles than less is good.  On the backup node(s) I run zfSnap.  Here's a snip of some of my snapshots


scsi-san/db01@2013-08-01_23.59.00--30d                    187M      -   412M  -
scsi-san/db01@2013-08-02_23.59.00--30d                    193M      -   418M  -
scsi-san/db01@2013-08-03_23.59.00--30d                    195M      -   421M  -
scsi-san/db01@2013-08-04_00.10.00--26w                    195M      -   421M  -
scsi-san/db01@2013-08-04_23.59.00--30d                    199M      -   424M  -
scsi-san/db01@2013-08-05_23.59.00--30d                    205M      -   430M  -
scsi-san/db01@2013-08-06_23.59.00--30d                    173M      -   398M  -
scsi-san/db01@2013-08-07_23.59.00--30d                    179M      -   404M  -
scsi-san/db01@2013-08-08_23.59.00--30d                    171M      -   409M  -
scsi-san/db01@2013-08-09_23.59.00--30d                    178M      -   416M  -
scsi-san/db01@2013-08-10_23.59.00--30d                    180M      -   419M  -
scsi-san/db01@2013-08-11_00.10.01--26w                    180M      -   419M  -
scsi-san/db01@2013-08-11_23.59.01--30d                    183M      -   421M  -
scsi-san/db01@2013-08-12_23.59.00--30d                    188M      -   426M  -
scsi-san/db01@2013-08-13_23.59.00--30d                    195M      -   433M  -
scsi-san/db01@2013-08-14_23.59.00--30d                    202M      -   440M  -
scsi-san/db01@2013-08-15_23.59.00--30d                    208M      -   446M  -
scsi-san/db01@2013-08-16_23.59.00--30d                    174M      -   400M  -
scsi-san/db01@2013-08-17_02.01.00--24h                    211M      -   437M  -
scsi-san/db01@2013-08-17_03.01.00--24h                   92.7M      -   401M  -
scsi-san/db01@2013-08-17_04.01.00--24h                    149M      -   457M  -
scsi-san/db01@2013-08-17_05.01.00--24h                    175M      -   453M  -
scsi-san/db01@2013-08-17_06.01.00--24h                    123M      -   451M  -
scsi-san/db01@2013-08-17_07.01.00--24h                    176M      -   453M  -
scsi-san/db01@2013-08-17_08.01.01--24h                    227M      -   453M  -
scsi-san/db01@2013-08-17_09.01.01--24h                    228M      -   454M  -
scsi-san/db01@2013-08-17_10.01.01--24h                    216M      -   443M  -
scsi-san/db01@2013-08-17_11.01.01--24h                    236M      -   462M  -
scsi-san/db01@2013-08-17_12.01.00--24h                    227M      -   453M  -
scsi-san/db01@2013-08-17_13.01.00--24h                    227M      -   453M  -


From cron...

# The command we're using to take snapshots is from
# https://github.com/graudeejs/zfSnap/wiki/zfSnap

# Hourly Backup
1 * * * * /usr/local/sbin/zfSnap -S -s -a 24h -r scsi-san

# Once a day Backup
59 23 * * * /usr/local/sbin/zfSnap -S -s -a 30d -r scsi-san
9 23 * * * /usr/local/sbin/zfSnap -S -s -a 30d -r zroot

# Weekly backup
0 0 * * 0 /usr/local/sbin/zfSnap -S -s -a 26w -r zroot
10 0 * * 0 /usr/local/sbin/zfSnap -S -s -a 26w -r scsi-san

# monthly backup
0 0 1 * *  /usr/local/sbin/zfSnap -S -s -a 13m -r zroot
0 0 1 * *  /usr/local/sbin/zfSnap -S -s -a 13m -r scsi-san


-Chad