Re: database backup trouble - Mailing list pgsql-general

From Tomi N/A
Subject Re: database backup trouble
Date
Msg-id d487eb8e0702020643t426020ffsd4ece6a82db5a0ce@mail.gmail.com
Whole thread Raw
In response to Re: database backup trouble  (George Weaver <gweaver@shaw.ca>)
List pgsql-general
2007/2/2, George Weaver <gweaver@shaw.ca>:

> And the .bat file script?

The .bat script is of no importance: it's a windows-related problem
(or, to be more precise, the problem of my ignorance when it comes to
windows scripting). The most trivial .bat scripts containing only a
simple echo statement or nothing at all aren't executed by the
scheduler.

The _idea_ was to invoke the pg_dump statement from a script using the
syntax I already described: it shouldn't be the problem. For
completeness, this is the beanshell script:

db_name = "my_db";
out_dir = "/tmp/";

//////////////////// DALJE SE NE MIJENJA NISTA ////////////////////
archive_name = db_name;
archive_name = archive_name + "_" + Calendar.getInstance().get(Calendar.YEAR);
archive_name =  archive_name + "-" + Calendar.getInstance().get(Calendar.MONTH);
archive_name =  archive_name + "-" + Calendar.getInstance().get(Calendar.DATE);
archive_name =  archive_name + "_" + Calendar.getInstance().get(Calendar.HOUR);
archive_name =  archive_name + "-" +
Calendar.getInstance().get(Calendar.MINUTE);
archive_name =  archive_name + "-" +
Calendar.getInstance().get(Calendar.SECOND);
archive_name = archive_name + ".backup";
print(archive_name);
command = "pg_dump -h localhost -U my_user_name my_db -f \"" + out_dir
+ archive_name + "\"";
print(command);
exec(command);

t.n.a.

pgsql-general by date:

Previous
From: Peter
Date:
Subject: Re: Query optimization problem
Next
From: Alexander Staubo
Date:
Subject: Re: PostgreSQL/FireBird