public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jesús Guerrero" <i92guboj@terra.es>
To: <gentoo-user@lists.gentoo.org>
Subject: Re: [gentoo-user] Writing a bash script or thinking about it anyway.
Date: Tue, 22 Dec 2009 13:11:34 +0100	[thread overview]
Message-ID: <c49e768e1e16a442432ff6338fc53b1c@localhost> (raw)
In-Reply-To: <4B30AB8E.7000903@gmx.ch>

On Tue, 22 Dec 2009 12:20:46 +0100, Christian Könitzer <chkab@gmx.ch>
wrote:
> 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:
> http://www.sanitarium.net/golug/rsync_backups.html
> 
> 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
case)
  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.


-- 
Jesús Guerrero



  reply	other threads:[~2009-12-22 12:12 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-22  3:22 [gentoo-user] Writing a bash script or thinking about it anyway Dale
2009-12-22  3:53 ` Francisco Ares
2009-12-22  4:16   ` Dale
2009-12-22  4:32     ` Francisco Ares
2009-12-22  5:02 ` Neil Walker
2009-12-22  5:09   ` Dale
2009-12-23  1:45     ` Francisco Ares
2009-12-25 23:21       ` Dale
2009-12-22 10:34 ` Jesús Guerrero
2009-12-22 11:20   ` Christian Könitzer
2009-12-22 12:11     ` Jesús Guerrero [this message]
2009-12-22 14:21       ` Christian Könitzer
2009-12-22 14:51         ` Alan McKinnon
2009-12-22 15:36           ` Jesús Guerrero
2009-12-22 19:01             ` Stroller
2009-12-23  6:58               ` Dirk Heinrichs
2009-12-22 18:56   ` Stroller
2009-12-22 23:25   ` Willie Wong
2009-12-22 11:16 ` Stroller
2009-12-22 23:30   ` Willie Wong
2009-12-22 15:08 ` Ward Poelmans
2009-12-22 15:39   ` Neil Bothwick
2009-12-22 15:57     ` Ward Poelmans
2009-12-23  0:33 ` [gentoo-user] " »Q«
2009-12-25 23:19   ` Dale
2009-12-27 21:09     ` »Q«
2009-12-23 12:29 ` [gentoo-user] " Alex Schuster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c49e768e1e16a442432ff6338fc53b1c@localhost \
    --to=i92guboj@terra.es \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox