From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 9A6F21381F3 for ; Sun, 5 May 2013 17:07:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 169E9E0978; Sun, 5 May 2013 17:07:41 +0000 (UTC) Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9AF4CE095F for ; Sun, 5 May 2013 17:07:39 +0000 (UTC) Received: by mail-wg0-f41.google.com with SMTP id y10so2015966wgg.2 for ; Sun, 05 May 2013 10:07:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:reply-to:to:subject:date:user-agent:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id; bh=vBvETRo5SI9fs7V1TuN4Pv6cHu+EFOG2yo9m0EEJJd4=; b=cubfXCn0ETltdaeQgLOVNtQms1HlAPtmL4wh9pwKrHXA3dDTAtxEuZnGjoIebe3gPY ZTT5C0xbHbRtyJwQ+cCNn/FzRyegh/bWcqYUsAYur6voNJKn2WWQ2ygPoWcbCvRYfgVQ mDYimaiODZ1jdZQWqo/DpDdIDcxSJrmdZUdw68gD0rCAfF9BHHRmMwGm5D36f7EJqnF4 Kt5yvipuvqldPN68EDRufUNdusVNhoYaZTIW3z+PWuLQpgXllEM0e3dTACKOWInQzwdk 8Yn0U9scQaXZH6nx27SqruJtWc60zsMQDV4CsZ108r375UtDrMHyWbJWRGSCOPW4IEpR 3Epw== X-Received: by 10.194.11.70 with SMTP id o6mr21677076wjb.29.1367773658356; Sun, 05 May 2013 10:07:38 -0700 (PDT) Received: from dell_xps.localnet (230.3.169.217.in-addr.arpa. [217.169.3.230]) by mx.google.com with ESMTPSA id s1sm9068638wiz.2.2013.05.05.10.07.36 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 05 May 2013 10:07:37 -0700 (PDT) From: Mick To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Using date/time variables in cronjobs? Date: Sun, 5 May 2013 18:07:23 +0100 User-Agent: KMail/1.13.7 (Linux/3.7.10-gentoo; KDE/4.10.2; x86_64; ; ) References: <51868F41.6050407@libertytrek.org> In-Reply-To: <51868F41.6050407@libertytrek.org> 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 Content-Type: multipart/signed; boundary="nextPart6003487.ChGL7JJfWf"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201305051807.36500.michaelkintzios@gmail.com> X-Archives-Salt: 1e5cbeb6-248e-444d-805e-f2c4d8b59d1d X-Archives-Hash: 4dc6a3880e4cb17bd5afd546d9e247f1 --nextPart6003487.ChGL7JJfWf Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Sunday 05 May 2013 17:56:33 Tanstaafl wrote: > Ok, another little thing... >=20 > Is there a simple way to use date/time variables in cronjobs? Or do I > need to use a bash script for this? I prefer simple, and just using the > variables directly in the cron command would be easier if it works, so > figured I'd ask first... >=20 > I'm trying to schedule a dump of my databases like so: >=20 > pg_dumpall --username=3Dusername -o -f > /home/user/mypg_backups/hourly/\%y/\%m/\%d/\%t.sql.gz >=20 > But trying to run this command fails with: >=20 > pg_dumpall: could not open the output file > "/home/user/mypg_backups/hourly/%y/%m/%d/%t.sql.gz": No such file or > directory >=20 > Tried escaping the variables and not, same error... Is it perhaps a matter of the process having write access? =2D-=20 Regards, Mick --nextPart6003487.ChGL7JJfWf Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQEcBAABAgAGBQJRhpHYAAoJELAdA+zwE4YeSakH/27YVZgcaTXMhO+CEebKDz69 aLe9MbFSrdoJHTLIRn8DIR71LfFA8LHdEKR67j19qfAemRgf3sidsg8o0yd3206o 3AXFHr3Pjyyk1OHX6cx9DkRAEuxMueyK6XHI61tUmdl5uV/oSfrMoxVSkBPenywF aMXMZixHe4LxoC0w5Rei8skTB2A2O8yODBN4/g7Mt/VBjH6EpKrZNSW7SCfIcrMs suGyr+fVRdhHI/7HOYfII2TYVCJw+PFeJW5V7vUE1FCSGLV9hYKpdpv9GcCXuAft HHd774Vqp+A4kHAw6pZ6em69evfmLkvA02czyjJutfxMHD9WcsLBklZ9FQBE3P4= =KA97 -----END PGP SIGNATURE----- --nextPart6003487.ChGL7JJfWf--