Re: database backup trouble

From: "Tomi N/A" <hefest(at)gmail(dot)com>
To: "George Weaver" <gweaver(at)shaw(dot)ca>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: database backup trouble
Date: 2007-02-02 14:43:56
Message-ID: d487eb8e0702020643t426020ffsd4ece6a82db5a0ce@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2007/2/2, George Weaver <gweaver(at)shaw(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Staubo 2007-02-02 14:45:03 Re: PostgreSQL/FireBird
Previous Message Peter 2007-02-02 14:36:37 Re: Query optimization problem