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 1OHIOs-00042C-68 for garchives@archives.gentoo.org; Wed, 26 May 2010 15:20:06 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7EB03E09EC; Wed, 26 May 2010 15:19:32 +0000 (UTC) Received: from mx01.admin-box.com (mx01.admin-box.com [78.47.249.108]) by pigeon.gentoo.org (Postfix) with ESMTP id 24402E09EC for ; Wed, 26 May 2010 15:19:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mx01.admin-box.com (Postfix) with ESMTP id 229DD3043341 for ; Wed, 26 May 2010 17:19:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mx01.admin-box.com Received: from mx01.admin-box.com ([127.0.0.1]) by localhost (mx01.admin-box.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hOlct+0J93vs for ; Wed, 26 May 2010 17:19:17 +0200 (CEST) Received: from maya.local (g231106176.adsl.alicedsl.de [92.231.106.176]) (Authenticated sender: daniel@troeder.de) by mx01.admin-box.com (Postfix) with ESMTPSA id 683AB3043340 for ; Wed, 26 May 2010 17:19:17 +0200 (CEST) Message-ID: <4BFD3B99.20802@admin-box.com> Date: Wed, 26 May 2010 17:17:45 +0200 From: Daniel Troeder User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100511 Thunderbird/3.0.4 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 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Performing a backup during the boot sequence References: In-Reply-To: X-Enigmail-Version: 1.0.1 OpenPGP: id=BB9D4887; url=http://pgpkeys.pca.dfn.de/pks/lookup?search=0xBB9D4887&op=get Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig9E09FD62A82FE67C9A7FD57C" X-Archives-Salt: f5d961ae-d0ad-43e3-afd8-60214ccf35fd X-Archives-Hash: 35b26bb5b2edcea427d6be01a0a1bfc1 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig9E09FD62A82FE67C9A7FD57C Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 05/26/2010 12:30 AM, Allan Gottlieb wrote: > For quite a while I have used the following steps to perform a > "single-user backup" >=20 > 1. Boot to single user mode via the grub command > kernel /boot/vmlinuz root=3D/dev/sda6 single >=20 > 2. Type in the root password. >=20 > 3. Execute a single command > /usr/local/sbin/ajg-backup-init-3 > which does the backup and then executes > init 3 >=20 > 4. This gets me to multi-user mode. >=20 > I would like to automate this so that booting directly to multi-user > mode via > kernel /boot/vmlinuz root=3D/dev/sda6 >=20 > All I need to do is to execute the single command > /usr/local/sbin/ajg-backup-init-3 > at the right moment. > This didn't seem hard; I want it after everything in boot but before > everything currently in default. So I was going to put it in > default with a "before *" in depend() >=20 > Reading the gentoo handbook chapter B4.d "Writing Init Scripts" > I find two comments criticizing this approach >=20 > 1. "You can also use the "*" glob [argument to before] to catch all > services in the same runlevel, although this isn't advisable". >=20 > 2. "Note: Make sure that --exec actually calls a service and not just = a > shell script that launches services and exits -- that's what the > init script is supposed to do." >=20 > I can see problems with multiple "before *" directives, but no other > script has one so I think I would be OK with my "before *". >=20 > Criticism 2 has me concerned since my backup routing is indeed a shell > script that exits. Indeed, my backup is not really a service so I am > worried that I shouldn't be using an initscript at all. >=20 > Any advice/comments would be welcome. >=20 > thanks, > allan >=20 >=20 You could create a LVM-snapshot of the partition/data you wish to backup at "before *" or inside "boot" and then later run the backup on the mounted snapshot, removing it afterwards. Bye, Daniel --=20 PGP key @ http://pgpkeys.pca.dfn.de/pks/lookup?search=3D0xBB9D4887&op=3Dg= et # gpg --recv-keys --keyserver hkp://subkeys.pgp.net 0xBB9D4887 --------------enig9E09FD62A82FE67C9A7FD57C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkv9O5wACgkQg3+4tbudSIfi8QCfc6NP04Hw+QXtYkZ3adyL8f5k uKkAn1zpSAuOecBFGYe/jv0CH9kt+PRd =+xk+ -----END PGP SIGNATURE----- --------------enig9E09FD62A82FE67C9A7FD57C--