5

A common tasks I teach new users in UNIX is how to make backups. Since most are not comfortable with the command line (CLI) and I want to have them make backups (more than forcing them to use the CLI), right now I teach them to drag and drop whole directories around.

The problem with that, of course, is that it takes a long time, as all files are copied every time.

I would prefer it if file managers would fire up rsync instead of cp -a when you copy over an existing directory. Is there a plugin for that? Anyone working on such functionality in a file manager already?

  • BTW: rsync is only faster since it makes some assumptions, which aren't always safe. It assumes modifying a file will change either the size or the mtime, but of course its possible for a program to do neither. I suspect that's why file managers don't do this optimization. You may want to teach new users how to use a simple backup program instead—less chance of error. – derobert Nov 22 '13 at 16:58
  • rsync can also checksum the file with -c, FWIW. as for "backup systems", the jury's still out on a proper backup system, see this question. – anarcat Nov 22 '13 at 16:59
  • Indeed it can. But then, unless read is substantially faster than write, it's not faster anymore (except over network, where disk speed is much greater than network speed). – derobert Nov 22 '13 at 17:00
  • 1
    You overlook that rsync will not write (or transfer) the complete file, but only the changed bits. – anarcat Nov 22 '13 at 17:09
  • But in order to checksum, it has to completely read both files. A straight copy would be read one, write the other. Instead, you've got read both, then read parts of one, write parts of the other. So unless read is much faster than write (and it isn't on typical magnetic HDDs), it's not going to be faster. Probably slower. – derobert Nov 22 '13 at 17:11
1

For the reasons mentioned in the comments, file managers do usually not use rsync to copy, but above all, a good backup solution should be incremental. Just imagine that one of your students makes an accidental change in a file and then copies it, as he was told to do as soon as possible, over the previous backup (using a file manager or rsync). A graphical (aka easy-to-use) interface for making backups will of course depend on the window manager you are using. There is a good backup solution for linux with Gnome or KDE (QT), called backintime, here: http://backintime.le-web.org/ . It makes incremental backups using rsync and is therefore fast. In addition, backups stay compact while each snapshot appears as a complete copy of the backuped directory (through the use of hardlinks). It requires some configuration effort, which could however be avoided by distributing a default configuration file to your students. The applications main window appears almost like a regular file manager. The actual backup is of course performed by pressing the backup button rather than by copy and paste. Another backup solution based on rsync (for KDE) is called luckybackup (http://luckybackup.sourceforge.net/).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.