Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: How would you go about saving and restoring your root directory?

  1. #11
    Join Date
    Jul 2006
    Beans
    4,791

    Re: How would you go about saving and restoring your root directory?

    I understand. It's looking more and more like it would be a wise alternative. The more I read about it the more I get the backup vs mirror implementation. The only thing I'm a little gray on is the actual restore process yet. Perhaps you can correct me where I'm wrong, but in my little localized test, what I'm seeing is that rdiff-backup does a mirror for source to destination, but the contents of rdiff-backup-data is where the "backup" feature comes in, whereas it's otherwise just a mirror. Okay fine, I'm just trying to figure out the process behind restoring a file.

    Example...

    HelloFriend.odt on desktop. rdiff-backup runs and synchronizes it to my server under /media/storage/jason. I open HelloFriend.odt on my desktop, select all, delete, save, and rdiff-backup runs again. The empty HelloFriend.odt is now on my server, BUT the older version containing text should be accessible... somewhere. A bit more reading and a few test drives and perhaps I'll swap it out tonight for the real deal.

  2. #12
    Join Date
    Jul 2006
    Beans
    4,791

    Re: How would you go about saving and restoring your root directory?

    I tried to refrain from responding here, but after all of the Google links turned purple from searching and the man page began yielding no additional responses, here I am.

    I've figured a lot out, as I understand now that I can restore specific incremental backups by specifying the particular backup found when I run rdiff-backup -l /path/to/backup/directory, then running rdiff-backup -r 2013-02-05T16:40:30 /path/to/backup/directory, for example.

    The part I'm lost at that's sending me into an absolute rage is the fact that I want to back up only specific directories. With rsync, I simply say:

    rsync -a /home/jason/Documents /home/jason/Music /home/jason/Pictures /media/external_hdd, and presto, Documents, Music, and Pictures all sync to my external hard drive. But doing *that* with rdiff-backup is not clicking with me no matter how many times I read examples and directions.

    So, question: How exactly would one back up multiple directories? Let's say we're using the above example... Documents, Music, Pictures, and the backup destination is /media/external_hdd. What would I do?

    EDIT - On top of that, I'm trying to do this over SSH. I'm getting the error that "Destination directory exists, but does not look like a rdiff-backup directory." If I use --force, it works, but the disclaimer saying that it could destroy the contents is sketchy. Eh?
    CANCEL EDIT - I had a hidden file that was in that directory, so it wasn't 100% empty. Rdiff was warning me that I could damage that data by running the backup. Durp durp... (leaving this here for future users)


    EDIT II - Some testing has kind of revealed exactly what I would have to do, but I'm left with one simple question. I created a list.txt file in /usr/local/bin, and then ran the following command:

    rdiff-backup --include-filelist /usr/local/bin/list.txt --exclude '**' /home/jason /home/jason/destination

    The contents of list.txt are:
    /home/jason/source1
    /home/jason/source2

    It didn't take anything else in my home directory. Not music, pictures, documents, nothing. Just source1 and source2. This is good! This is what I wanted. So we're all good... however... it doesn't seem to be taking the CONTENTS of source1 and source2. It just takes the parent directories and that's it. On the flip side of the coin, if I do a regular rdiff-backup /home/jason/source1 /home/jason/destination, it works fine and takes the contents. It's something about this include file that isn't flying, and I can't crack it...

    EDIT III - Seems as if I need to do --include-globbing-filelist, not just --include-filelist. Now it takes the contents. Nice! Some light reading indicated that globbing is a way of lumping together wildcards, or something of that nature. Sort of like this:

    For example, to list all the JPEG and GIF files that start with either "ab" or "def" you could do:

    $ ls +(ab|def)*+(.jpg|.gif)


    Of course you could also do this without extended globbing:

    # ls ab*.jpg ab*.gif def*.jpg def*.gif
    Source - http://www.linuxjournal.com/content/...ended-globbing

    The only other question I have is... if I want to do the --remove-older-than command, can I do that on one directory, or must it be done on all sub directories? Or should that be done on the client system?

    Example - all backups are stored in /media/storage/user. Can I run rdiff-backup --remove-older-than 5D /media/storage and have it take care of fred/frank/bob/dave in one shot, or must I run them individually, like so:

    rdiff-backup --remove-older-than 5D /media/storage/fred
    rdiff-backup --remove-older-than 5D /media/storage/frank
    rdiff-backup --remove-older-than 5D /media/storage/bob
    rdiff-backup --remove-older-than 5D /media/storage/dave

    OR, should I run it along with the client machine? Example:

    rdiff-backup --include-globbing-list /usr/local/bin/includelist.txt /home/jason jason@192.168.1.10::/media/storage/jason
    rdiff-backup --remove-older-than 5D jason@192.168.1.10::/media/storage/jason
    Last edited by Roasted; February 6th, 2013 at 02:33 AM.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •