backups

Bob Jonkman bjonkman at sobac.com
Fri May 10 21:20:53 UTC 2013


I've bought a few 1, 2 and 3 TByte external USB drives, which were
cheaper than the equivalent internal drives.  I simply popped them out
of their enclosures and put them into desktop computers, one of which I
use as a media  and backup server.

I manually run the following script when I want to make a backup of a
particular folder structure.  This works for home folders on various
laptops and desktop computers, as well as the /var/www/ folder on the
Web server, and the /var/mail/ folder on the mail server...

===== dobackup.sh =====
#! /bin/bash

# Program: dobackup
# Purpose: Perform backup of current directory to backup server
# Author: Bob Jonkman
# Date: 5 April 2013

# Note: Current backup server is verne, the media server

# Exclusion file must exist or rsync errors out
if ! [ -e .rsync-exclude ] ; then
    touch .rsync-exclude
fi

# Options: all, verbose, compress file data during transfer, use
exclusion file .rsync-exclude in current folder, create destination
path[1]; backup current folder (and children), send to location on
backup server

# [1] From http://stackoverflow.com/a/14877351 : mkdir with parents of
destination location; run rsync

rsync -avz --exclude-from=.rsync-exclude --rsync-path="mkdir -p
/home/bjonkman/backup/$HOSTNAME`pwd` ; rsync" ./
bjonkman at verne:/home/bjonkman/backup/$HOSTNAME`pwd`

# EOF: dobackup
=====

You may have to unwrap some of the lines if they've been munged by the
mailing list, and, of course, substitute your hostname and username
(unless you're bjonkman at verne too :-)

I keep that script in /usr/local/bin/ so it won't get nuked by upgrades.

For things like my home folder the .rsync-exclude file is something like
this:

===== .rsync-exclude =====
# File: zelazny:/home/bjonkman/.rsync-exclude
# Purpose: rsync Backup exclude list for host zelazny (Bob's laptop)
# Author: Bob Jonkman
# Date: 26 November 2012

Downloads/
Music/
Video/
verne*/
Trash/

# This should catch both Firefox and Thunderbird cache
Cache/

# Catch VM live CDs
*.iso

# Don't recurse into ecryptfs folders
.ecryptfs/
.Private/


# EOF: rsync-exclude
=====

Yes, I could use an automated backup system, but I haven't needed to
scratch that itch yet.


Before I used this script I used Ubuntu's 'deja-dup', but something went
wrong with (one of?) the duplicity files on the backup server. Now that
whole backup is corrupt.  The nice thing about 'rsync' backups is that I
can manually copy back any file I want to restore. That's fine as long
as the backup server is under my control, but I don't recommend that if
you're using a cloud provider. Then, encrypt all the things:
https://encrypteverything.ca/


--Bob.


Bob Jonkman <bjonkman at sobac.com>         http://sobac.com/sobac/
SOBAC Microcomputer Services              Phone: +1-519-669-0388
6 James Street, Elmira ON Canada  N3B 1L5  Cell: +1-519-635-9413
Software   ---   Office & Business Automation   ---   Consulting



On 13-05-10 03:01 PM, Raymond House wrote:
> Hi all, what would you suggest for an external storage devise that I could
> use for backing up my files ? I'm using ubuntu 13.04 and unity. I have been
> using Ubuntu One and this way of backing up is just too much of a data
> gobbler for me, I'm using a Bell internet hub and every 5GB slice is
> expensive. I have been looking at the Dell 500 GB external hard drive, is
> this compatible with Ubuntu, your comments, please.
> 
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-ca/attachments/20130510/0ded81be/attachment-0001.pgp>


More information about the ubuntu-ca mailing list