Backup followup

 

Backing up computers and data is hard. It shouldn't be but it is. Mainly because either software is crap or pricing is too weird and not sensible for your usecase. I used crashplan for my machines, but they decided to fsck off out of the consumer backup market and left the rest of us hanging. They were the only real set and forget Linux backup solution. 

So I wrote about my options a while back so I thought I'd mention where I had gotten to.

1) I retired a bunch of machines I don't care about, my partners mac-book, moved my working data between my laptop dual boot partitions to a SD card which both partition could access but only one backs up (my Linux partition because that is the one I care about).

2) I used back-blaze consumer thingy for my partners backup because that's exactly the backup that makes sense for all backup, just back it all up.

3) GET MAD AT B2, SHOUT A LOT, MOAN A LOT, and then decide to set up my own solution because B2 + the shitty none backblaze software is crap.

4) So right now I'm still using crashplan to backup my 30GB of stuff on my laptop to my NAS. This is the only real bit that needs regular backup, just like backblaze. There is no way I'm paying backblaze for this or pissing around with the 3rd party software that supports B2. THIS IS THE BIT I'M MAD ABOUT.

5) In order to back up my NAS I enlisted my friend Mike and we now we both have 12TB HP microservers which sync, encrypting on the machine before transmitting. 

NOTE TO BACKBLAZE!!!! Linux people are users too!!! We don't always want to be a fscking SysAdmin when we want to back up my LinuX laptop.

So I now just need a set and forget backup solution for my Linux laptop which only has 30GB free space on the disk (the SSD is a 180GB disk dual boot with Windows and Linux). This should be trivial like crashplan but backblaze are making a real hash of it.

ZFS Notes

ZFS snapshots in a cron job


OK, so at work there is a backup server that has various cronjob scripts that run nightly to backup various production servers. This machine was recently upgrade to accommodate larger hard disks. We took the opportunity to use Solaris 11 with ZFS. Since we already use cronjobs, I wanted to have the automatic snapshots and backup scripts all controlled from one place, rather than using svcs.

At midnight every night the backup scripts launch. So just before this, at half 11, the snapshot_daily script will launch.

#!/bin/bash
unset PATH

DATE=/usr/bin/date
GREP=/usr/bin/grep
XARGS=/usr/bin/xargs
ZFS=/usr/sbin/zfs
HEAD=/usr/gnu/bin/head

RETENTION=7
POOL=datapool

#take daily snapshot
$ZFS snapshot ${POOL}@daily_`$DATE +%m%d%Y`

#remove any daily snapshots older than RETENTION days
$ZFS list -rt snap -H -o name ${POOL} | $GREP daily | $HEAD -n -${RETENTION} | $XARGS -n 1 zfs destroy

The general idea is that it makes the daily snapshot and lists the daily snapshots in order (newest to oldest), but skips the first few denoted by the RETENTION variable (in this case set to 7). Then it deletes them.

I know there are other more sophisticated ways of doing this, but I like the simplicity.

ZFS Install on Centos

Quick notes for myself really. I wanted to install zfs-fuse on centos. This is how I did it.

sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm
yum install zfs-fuse
Home