X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 95FA55E4713 for ; Thu, 2 Sep 2004 03:55:08 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 15075-10 for ; Thu, 2 Sep 2004 06:55:06 +0000 (GMT) Received: from newt.alethe.net (newt.alethe.net [66.92.183.35]) by svr1.postgresql.org (Postfix) with ESMTP id 946845E470E for ; Thu, 2 Sep 2004 03:55:05 -0300 (ADT) Received: from [66.92.183.34] (dsl092-183-034.sfo1.dsl.speakeasy.net [66.92.183.34]) (authenticated bits=0) by newt.alethe.net (8.12.11/8.12.11) with ESMTP id i826swYK046342 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Wed, 1 Sep 2004 23:54:59 -0700 (PDT) (envelope-from cognosco@tentacle.net) Message-ID: <4136C42B.50303@tentacle.net> Date: Wed, 01 Sep 2004 23:56:43 -0700 From: Kaolin Fire User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-admin@postgresql.org, research_2004@yahoo.com Subject: Re: Create Linux Script for PostgreSQL database backup References: <20040901132055.17178.qmail@web61008.mail.yahoo.com> <200409020744.03552.tech@glastonburymusic.org.uk> In-Reply-To: <200409020744.03552.tech@glastonburymusic.org.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/22 X-Sequence-Number: 14725 For that matter: echo "1 3 * * * postgres /usr/local/bin/pg_dumpall > ~/backup.sql" >> /etc/crontab note to remember the two >>'s so you don't obliterate your crontab like I just did. :ulp: -kaolin tim hall wrote: >Lawrence C, >On Wednesday 01 September 2004 14:20, you went: > > >>Anyone good in writing Linux scripting for backup >>PostgreSQL. I just required a simple scripts only. >> >>Normally we do the manual ways as following: >> >>In root >> >>root# su - postgres >>bash# pgdumpall > backup.sql >>bash# exit >>root# >> >>I'm planning to write script.sh for cronjob but not >>too sure about it. Can anyone contribute the scripts >>for me? >> >> > >Er ... > >#! /usr/bin/bash >pgdumpall > backup.sql > >I'm being cheeky, but surely if you set that up as a cronjob for user >'postgres' that would do it? Are your needs more complex than this? > >cheers > >tim hall > >---------------------------(end of broadcast)--------------------------- >TIP 8: explain analyze is your friend > > >