Advice on backup method

David Fletcher dave at thefletchers.net
Sun May 29 09:34:19 UTC 2016


On Sun, 2016-05-29 at 10:50 +0200, Chas IRONS wrote:
> Good day all

Thank you! It's a lovely day here in Wiltshire.


> As a retired end user of Ubuntu Linux since 2005 I cannot get an
> easy/simple backup method to work. Would File Manager copy to a flash
> drive and restore a damaged file safely? I have never needed to
> recover but it may happen.

One day if you computers for long enough you will have a hard drive
failure. Then you will need to recover!

Many years ago I used the microsoft backup tool which failed dreadfully,
since when I've never trusted such packages and just "roll my own". It's
not that difficult for those with an open mind who are prepared to read
some manuals and learn.

My backup solution is some simple scripts based on commonly used Linux
utilities. The one I use by rebooting the desktop (because I have some
auto mounted directories on a server) then logging in as administrator
and running the following script called BackupThisPC with sudo is:-

#! /bin/bash

# Local etc directory
rsync -av --delete /etc/ /home/dave/backups/copyoflocalslashetc/

aptitude search '~i !~M' | tr -s ' ' | cut -f 2 -d ' '
> /home/dave/backups/AppsInstalledList.txt

tar cvpPzf /root/home`date +%Y%m%d%H%M`.tar.gz
--exclude-from=/home/BackupThisPCExcludes /home/*



where the BackupThisPCExcludes file contains:-

/home/dave/ServerMusic/*
/home/dave/ServerPhotos/*
/home/dave/ServerWork/*
akonadiserver.socket
.cache/*
.evolution/mail/imap/*
.googleearth/*
.gvfs
.local/share/akonadi/db_misc/mysql.socket
.thumbnails/*
/home/dave/.kde/share/apps/kio_http/cache/*
http___maps.google.co.uk


Most of my files and all of my email are stored on a different computer
on my network, my mini server. I have other scripts that run under cron
to rsync the server's /etc/ and home directories to my ~/backups/
directory on the desktop for inclusion in the tar archive file.

DO NOT trust a single flash drive with your valuable data. They do
fail... from time to time. I use several flash drives, copying the tar
archive to the first drive, then copying the tar archive from the first
flash drive to the second, and so on... then copy the tar file from the
last flash to my laptop and unpack it there. If it works I know that I
have a good backup on each of the flash drives.

If you want an off site backup, Samsung SD cards are specified to
survive a wide range of storage temperatures and fit inside a small
waterproof container such as a 35mm film canister which can be kept
anywhere outside your house.

I KNOW that this backup solution works, because I have upgraded my
server to a new version of Ubuntu server on a new hard drive, and all of
my email and everything else was successfully restored.

Dave






More information about the ubuntu-users mailing list