Slashdot Mirror


Ask Slashdot: Temporary Backup Pouch?

An anonymous reader writes "It looks simple. I've got a laptop and a USB HDD for backups. With rsync, I only move changes to the USB HDD for subsequent backups. I'd like to move these changes to a more portable USB stick when I'm away, then sync again to the USB HDD when I get home. I figured with the normality of the pieces and the situation, there'd be an app for that, but no luck yet. I'm guessing one could make a hardlink parallel-backup on the laptop at the same time as the USB HDD backup. Then use find to detect changes between it and the actual filesystem when it's time to backup to the USB stick. But there would need to be a way to preserve paths, and a way communicate deletions. So how about it? I'm joe-user with Ubuntu. I even use grsync for rsync. After several evenings of trying to figure this out, all I've got is a much better understanding of what hardlinks are and are not. What do the smart kids do? Three common pieces of hardware, and a simple-looking task."

10 of 153 comments (clear)

  1. Hardlinks by funwithBSD · · Score: 2, Informative

    Oh dear.

    Hardlinks don't span storage devices. They are files that share the same inodes on single storage device. Soft links do, but they are pointers to the inode, so "backup" using softlinks and you have a bunch of pointers to data that is on the original system. NOT on the thumb drive!

    Use one of the backup packages out there, you are not at the point of rolling your own.

    Not even close.

    --
    Never answer an anonymous letter. - Yogi Berra
  2. unison-gtk by niftydude · · Score: 3, Informative

    Since you are an ubuntu user, and it looks like you just need a nice rsync front-end to handle backup of the same data to two different drives, I'll suggest unison-gtk.

    Very nice, simple front-end, and will do what I think you need.

    --
    You can never know everything, and part of what you do know will always be wrong. Perhaps even the most important part.
    1. Re:unison-gtk by Anonymous Coward · · Score: 4, Informative

      I think people (including you) don't understand what he needs. He has a complete backup at home. When he's on the move, he wants to backup only modifications that are not already backed up at home, so that the backup fits on a USB stick. To know what has and hasn't changed, he can't access the backup at home, like rsync would need to do. His idea was to have a space-saving complete copy of the backup on his laptop via hard links. You might think that file modification times could be used, but both solutions leave the problem of communicating file deletion. Suppose he needs to recover. He would copy his home backup to the new drive and then he would have to integrate the incremental backup. How would the incremental backup keep the information about deleted files without access to the base backup? I suppose one could keep a recursive directory listing with the incremental backup, but that's the question: Is there a ready-made solution for this?

    2. Re:unison-gtk by Hatta · · Score: 3, Informative

      To know what has and hasn't changed, he can't access the backup at home, like rsync would need to do.

      If I understand correctly BackupPC caches the checksums rsync generates to enable exactly that. It would be nice if that was possible with vanilla rsync.

      --
      Give me Classic Slashdot or give me death!
  3. Unison? by Anonymous Coward · · Score: 3, Informative

    I hesitate to offer this, because I've not experimented with it in the precise scenario you describe. However, being another Joe User with ubuntu, I took a look at rsync as a way to implement backups between my home PC and an Apple Time capsule that I was using as a secondary backup device.

    After some tinkering I settled on Unison, which is available in the ubuntu repositories. It's essentially a sophisticated rsync front end, with a few bells and whistles. You get 2-way directory replication between your 'local' and 'remote' file systems [though they could both be local or both remote if you choose] and you can essentially script multiple different backups into the single interface. For example, I have "Office" for documents, spreadsheets and the like, "Photos", for camera images, "Music", and so on.

    Like most tools, Unison is imperfect, but it's simple to use once set up. The key point with it, as with any product you put in this space, will be knowing and keeping track of your definitive data source. If you have a document that exists on both your local and backup systems, and you edit that file separately at each location, then run Unison, only the most chronologically recent copy will be preserved. To go beyond this level of functionality and get to something that can intelligently merge changes, I think you're going to need something more like a CVS tool... There are hugely expensive proprietary solutions (like Livelink), but I've not come across anyone using a good FOSS alternative. HTH...

    1. Re:Unison? by DrVxD · · Score: 5, Informative

      rsync doesn't handle deletions

      rsync handles deletions just fine - that's why it has a --delete option...

      --
      Not everything that can be measured matters; Not everything that matters can be measured.
  4. Re:The smart kids by ThePeices · · Score: 2, Informative

    You Sir are completely correct.

    The smart kids use Linux.

  5. Duplicity, perhaps by Wizarth · · Score: 3, Informative

    Duplicity uses librsync to generate the changeset that rsync would use, then stores the change set. If you stored the change set to the USB drive, this could then be "restored" to the destination drive, perhaps? I don't know if there's any way to do this out of the box, or with a bit of scripting, or if this would need to be a whole new toolchain.

  6. dar? by safetyinnumbers · · Score: 3, Informative

    If I understand your problem right, How about dar? It can make an empty archive of your main backup to act as a reference (just file info, no files). Then it makes archives relative to that, with just changed files. It can then apply the changes to the original dir, including deletions, if you need that.

  7. Re:SkyDrive by Lord+Crc · · Score: 5, Informative

    Obviously Skydrive is of no use but there are several other alternatives that would be better suited to this purpose although if, as he says, it is for use while travelling an internet based system is useless.

    That's why I liked Crashplan when i first saw it. This may sound like a sales pitch but I'm just a happy customer.

    With Crashplan you can have multiple destinations for your backup set. I usually have three:
    - same HD in case I accidentally deleted some files.
    - USB HD for faster recovery in case my primary HD breaks.
    - Online "in the cloud", in case my house burns down etc.

    Crashplan detects when I plug in the USB HD and automatically starts running updating the backup on it. If there's no internet the first two destinations will still keep me pretty safe. Once the internet is back it catches up on the cloud destination.

    It works just fine on my Linux Mint laptop as well as my Windows desktop pc.