On Wed, 2009-06-24 at 15:30 -0700, John Jason Jordan wrote:
> 
> I suspect part of the problem is the pybackpack GUI for rdiff-backup.
> Before tossing out rdiff-backup completely I'm going to see if dumbass
> me can learn how to use it from the command line. 

It's really pretty simple -- the man page is somewhat overwhelming
because there are a load of options, but there probably are very few you
actually need to worry about, unless you're trying to do fancy,
elaborate things.  And unlike many *nix man pages, this one actually
provides some useful examples.  Also, the website provides some helpful
examples and usage cases.

The main option you will probably want is to construct a list of
directories you want to exclude from your backup (including the infamous
~/.gvfs).  There are a couple of different ways to do that.  What I do
is use the option --include-globbing-filelist.

This is my globbing-filelist, which I name "rdb_exclude.txt":

mcu...@drifter:~$ cat Documents/rdb_exclude.txt 
- /home/mcubed/.adobe
- /home/mcubed/.bogofilter
- /home/mcubed/.cache
- /home/mcubed/.compiz
- /home/mcubed/.dbus
- /home/mcubed/.gnupg
- /home/mcubed/.gpilotd
- /home/mcubed/.gvfs
- /home/mcubed/.local/share/Trash
- /home/mcubed/.macromedia
- /home/mcubed/.mozilla/firefox/zljdhijx.default/Cache
- /home/mcubed/.thumbnails
- /home/mcubed/.update-notifier
- /home/mcubed/Desktop
- /home/mcubed/.ICEauthority
- /home/mcubed/.gksu.lock
- /home/mcubed/.gpilotd.pid

The "-" (minus sign) means those directories will be excluded from my
backup.  So my complete command is:

$ rdiff-backup --include-globbing-filelist
 /home/mcubed/Documents/rdb_exclude.txt /home/mcubed /backup/back_uhome

(That all goes on one line.)

That copies everything in /home/mcubed to /backup/back_uhome --
everything except those directories or files I don't want to backup,
which I put into the file list.  (The file list itself, of course, does
get backed-up, because it resides in /home/mcubed/Documents and I do
backup that directory.

I'm not completely 100% sure you need to use absolute paths in all cases
-- I did for clarity's sake.  (When I'm in somewhat unfamiliar
territory, I find it easier to use absolute paths so I can always be
sure what I doing and not end up relying on expansion when I shouldn't
or thinking I'm indicating one thing when I'm actually indicating
something else.)  I think the man page says something about that.  In
any case, it will work if you do always use absolute paths, so perhaps
that's the safer bet.  It just means a little more typing.  :-)

If you're going to be backing up directories owned by root, you'll need
to use sudo to do those.  You shouldn't need to use sudo when you're
backing up /home/jjj (presuming, of course, that user jjj has write
access to your backup directory).

-- 
Michael M.

_______________________________________________
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to