On Tue, 22 Dec 2009 12:20:46 +0100, Christian Könitzer <email@example.com>
> I agree with Jesús but recommend you to use rsync for backup purpose.
> Simple google for rsync backup script.
> And this link explains why:
> There are a lot backup scripts using rsync out there and most of them
> are written in bash so it's anyway a good idea to learn a bit bash
That's basically it. I also agree that rsync is nowadays the way to go for
general purpose backups, unless...
a) the volume can't be mounted while the backup is running (not the
b) your fs supports snapshots (or you use LVM)
c) you have an rcs based solution, like svn, git or whatever else
The snapshot option is the absolute safest because it ensures that all the
files will be consistent, and the tar based solution is probably the worst
of them unless you truly can guarantee that the files are not being written
concurrently while you do the backup (i.e. the fs is not being used at all
or it's mounted read only). A good practice in any case is to capture the
exist status of any given tool you are going to use to ensure that no error
happened. Discovering that a backup is incomplete or corrupt when you need
it is a bit unpleasant to say the least.
Bash can be used for that, just to put a simple example. As you say,
regardless of the solution of your choice to do the actual backup there's a
lot of room for improvement, automation, error loging, verification, etc.
using shell scripting.