From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1NN3bd-0007Rv-Qi for garchives@archives.gentoo.org; Tue, 22 Dec 2009 12:12:49 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A883CE0A7C; Tue, 22 Dec 2009 12:11:38 +0000 (UTC) Received: from IMPaqm3.telefonica.net (impaqm3.telefonica.net [213.4.129.23]) by pigeon.gentoo.org (Postfix) with ESMTP id 42586E0A7C for ; Tue, 22 Dec 2009 12:11:38 +0000 (UTC) Received: from IMPmailhost3.adm.correo ([10.20.102.124]) by IMPaqm3.telefonica.net with bizsmtp id L7J11d00R2h2L9m3PCBdfz; Tue, 22 Dec 2009 13:11:37 +0100 Received: from jesgue.homelinux.org ([78.136.66.163]) by IMPmailhost3.adm.correo with BIZ IMP id LCBb1d00b3XLmEe1jCBc6m; Tue, 22 Dec 2009 13:11:37 +0100 X-TE-authinfo: authemail="i92guboj.terra.es" |auth_email="i92guboj@terra.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitera01" Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Date: Tue, 22 Dec 2009 13:11:34 +0100 From: =?UTF-8?Q?Jes=C3=BAs_Guerrero?= To: Subject: Re: [gentoo-user] Writing a bash script or thinking about it anyway. In-Reply-To: <4B30AB8E.7000903@gmx.ch> References: <4B303B5D.2060400@gmail.com> <6155bd0861f00c277e49c2b0b8028c17@localhost> <4B30AB8E.7000903@gmx.ch> Message-ID: X-Sender: i92guboj@terra.es User-Agent: RoundCube Webmail/0.3.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 5e961910-c44b-4268-9b3b-8d166dc686b0 X-Archives-Hash: 17093df3a71c9d6ad84c58a88cfbe9bf On Tue, 22 Dec 2009 12:20:46 +0100, Christian K=C3=B6nitzer wrote: > I agree with Jes=C3=BAs but recommend you to use rsync for backup purpo= se. > Simple google for rsync backup script. > And this link explains why: > http://www.sanitarium.net/golug/rsync_backups.html >=20 > There are a lot backup scripts using rsync out there and most of them=20 > 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 fo= r 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 th= e files will be consistent, and the tar based solution is probably the wors= t of them unless you truly can guarantee that the files are not being writt= en concurrently while you do the backup (i.e. the fs is not being used at al= l 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 err= or happened. Discovering that a backup is incomplete or corrupt when you nee= d 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. --=20 Jes=C3=BAs Guerrero