The backup file is still good. All you need to do is load psql, set the
datestyle variable and restore from the backup.

$ psql dbname
dbname=# set datestyle to 'sql, european';
dbname=# \i backup.sql


You can also add this to the backup function in AM.pm after line 578

-- set options
$myconfig->{dboptions};

This sets the date.

  print OUT qq|-- SQL-Ledger Backup
-- Dataset: $myconfig->{dbname}
-- Version: $form->{dbversion}
-- Host: $myconfig->{dbhost}
-- Login: $form->{login}
-- User: $myconfig->{name}
-- Date: $today
-- 
-- set options
$myconfig->{dboptions};
--
|;


Dieter Simader    http://www.sql-ledger.org   (780) 472-8161
DWS Systems Inc.     Accounting Software       Fax: 478-5281
=========== On a clear disk you can seek forever ===========

On Sat, 28 Sep 2002 [EMAIL PROTECTED] wrote:

> Hello,
>
> I've working yet for quit a long time with [SL]. For savety reasons i'm
> backuping the [SL]  database with the
> pg_dump utility from PostgreSQL.
>
> After creating a backup file 'm importing it in on a stanby (backup) system
> (about 40 km from the orginal system) by
> the next actions.
>
> dropdb <db>
> createdb <db>
> psql <db>  <  "dumpfile"
>
> This works fine.
>
> But there is a feature in [SL] called backup and it is possible to send it
> as an email or as a file.
> So now it is not neccesarely anymore to drop the db/create the db etc.
>
> now you could specify
>
> psql <db>  < "backupfile"
>
> But what happenes now:
>
> The dates changed.  Normal wise when the date is stored as 11 june 2002
> (11/06/02) it is restored as: 06/11/02.
>
> But when dates are stored as 31/08/02 the restore date is the same.
>
> So till now I can't use this nice feature. Till then I'm using the old
> trick.
>
> But is it possible to solve this problem. Otherwise the backupfile is
> worthless.
>
> kind regards,
> Bert Tijhuis
>





-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
-------------------------------------------------------
(un)subscribe: http://lists.sourceforge.net/lists/listinfo/sql-ledger-users
Archive: http://www.mail-archive.com/[email protected]/

Reply via email to