Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 9972A9FA621 for ; Mon, 27 Nov 2006 19:41:28 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 42696-07 for ; Mon, 27 Nov 2006 19:41:20 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.235]) by postgresql.org (Postfix) with ESMTP id 23FAD9FA48B for ; Mon, 27 Nov 2006 19:41:24 -0400 (AST) Received: by wx-out-0506.google.com with SMTP id i28so1806136wxd for ; Mon, 27 Nov 2006 15:41:22 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=a1z+wwY7uvk9+8GdQxomzwu34TEIfJouTeLfSWuuXAZyrqUsXp3dqwXJKOpXxDLRi15B01v865gPQcpOOHNp2atH265Tne/7jME9NyZbKiSaPR59mh/V9qFxxx+Z7dLBHQZvNvxRZkdyKMme+aaTWtK9N9Q1TNhD3c7iQ2gUINo= Received: by 10.70.129.2 with SMTP id b2mr380102wxd.1164670882465; Mon, 27 Nov 2006 15:41:22 -0800 (PST) Received: by 10.70.104.20 with HTTP; Mon, 27 Nov 2006 15:41:22 -0800 (PST) Message-ID: Date: Mon, 27 Nov 2006 23:41:22 +0000 From: "Tomi N/A" To: john.abraham@sysbuild.net Subject: Re: Backup with Java Cc: tommaso.taruffi@ricesoft.it, pgsql-jdbc@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <456afd7a.330.e42.37531057@webh5.fe.aruba.it> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/149 X-Sequence-Number: 16191 2006/11/27, John S.Abraham : > > Tommaso: > > Why not try pg_dumpall, instead? > > The file that this command creates allows a complete regeneration of the > database cluster, including users and user permissions. Even better, its > already written and you can schedule it using the UNIX/LINUX command 'cron'. Because, for instance, calling pg_dumpall has a number of shortcomings: 1.) access rights You have to have a shell/ftp/other account on the machine or make the network admin give you some other sort of network access (samba, nfs) so that you can work with backup files. You also have to be allowed to define cron tasks and have a potentially large disk space quota. 2.) event based dump cron is a nice way to make sure a backup gets done, but sometimes backups make sense in relation to critical events in the system: e.g. before occasional massive data imports or updates. In those circumstances, having, say, a special stored procedure which backs up the whole database and returns the content to the caller over the network would enable a programmer building an application in *any* language to add a manual backup feature which the users could then use at will. 3.) Misc. nuisances Aside for backup/restore functionality, a user communicates with the database exclusively with the connection string. Making sure that your application (even one which isn't multiplatform) will find the pg_* tools is an additional issue you have to think of and resolve, instead of sending a request directly to the database server (calling a backup procedure), like you do generally when you need something from the RDBMS server. Cheers, t.n.a.