Super simple folder backup one-liner

Posted on Fri 06 June 2014 in Tech

I needed a simple cron job, that just took backups of my project folders, should the worst happen to my laptop. Google brought up nothing obvious, so I figured I'd share it here.

tar zcvf /tmp/snap.tgz ~/Projects && rsync /tmp/snap.tgz user@remotebox:/home/backups/snap_`date +%F_%T`.tgz && rm /tmp/snap.tgz

Okay, I'll admit it's a bit of a long one-liner.