Hi Peter

> I see that I can find everything in case I need to restore too. Now to
> test it as a future incremental backup. The only question that I have
> before I continue is that on my backup media I have a directory called
> pictures already, and will this overwrite it, or just do the
> incremental backup on it?
>
> The script looks like this:
>
>     # Program to backup /Home/peterm to USB store  using rdiff-backup
>     # as suggested by Ralph Corderoy
>     #  October 12 2015.
>     # Intention is to do one full backup per year and then monthly
>     # append to it.  separate backup for pictures. can it be done to
>     # pictures directory on backup unit?

You may want to back up a lot more often than this once you've
experimented and seen if a new backup only takes a little disk space,
e.g. weekly.

>     # may want to clean out firefox/chrome caches first.
>     # rm ~/.mozilla/firefox/*.default/*.sqlite 
> ~/.mozilla/firefox/*default/sessionstore.js
>     rm -r ~/.cache/mozilla/firefox/*.default/*

If you ask rdiff-backup to exclude that instead then the cache will
remain to aid Firefox.

>     rdiff-backup --exclude "/home/peterm/My_Pictures/" \
>         /home/peterm/ "/media/peterm/Expansion Drive/U-backup-oct15"
>
>     # now backup the pictures
>     # rdiff-backup "/home/peterm/My Pictures/" "/media/peterm/Expansion 
> Drive/pictures"

Ah, you're saying you've already backed up My\ Pictures in the past to
pictures, but not with rdiff-backup, and what will happen.  I've just
tried.

    $ mkdir -p src dest
    $ touch src/foo
    $ rdiff-backup src dest
    $ ls dest
    foo  rdiff-backup-data

So it doesn't mind an empty dest already existing.

    $ rm -rf dest
    $ mkdir dest
    $ touch dest/foo

Now src and dest both have an empty foo.

    $ rdiff-backup src dest
    Fatal Error: Destination directory

    dest

    exists, but does not look like a rdiff-backup directory.  Running
    rdiff-backup like this could mess up what is currently in it.  If you
    want to update or overwrite it, run rdiff-backup with the --force
    option.

Let's throw in a bar too, and --force as it said.

    $ touch dest/bar
    $ rdiff-backup --force src dest
    $ ls dest/bar
    ls: cannot access dest/bar: No such file or directory

So it has removed bar, probably not what you want.

If pictures really is a copy of an older My\ Pictures, with much content
the same in the same files, then you could try

    rdiff-backup pictures pictures.rdiffb

as a one-off command to prime the rdiff-backup destination and then

    rdiff-backup '/home/peterm/My Pictures' \
        '/media/peterm/Expansion Drive/pictures.rdiffb'

from then on.

There are some other commands you might like to consider.

    rdiff-backup -v 4 --verify \
        '/media/peterm/Expansion Drive/pictures.rdiffb'

Read all the files in the latest backup and compares their SHA1 digests
against the rdiff-backup's metadata.  There's --verify-at-time to check
old backups.

    rdiff-backup --list-increment-sizes \
        '/media/peterm/Expansion Drive/pictures.rdiffb'

List the current, latest, backup and its size, and all the older backups
and their increments' size.  This may persuade you that you've the space
for more frequent backups.

Cheers, Ralph.

--
Next meeting:  Bournemouth, Tuesday, 2015-11-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue     / TO THE LIST OR THE AUTHOR

Reply via email to