hard to restore DB in windows xp with TT 2.2.16.105

Topics brought up by the TimeTrex open source community.
Locked
gherghel
Posts: 16
Joined: Thu Dec 18, 2008 6:53 am
Location: Romania

hard to restore DB in windows xp with TT 2.2.16.105

Post by gherghel »

It`s easy to backup a postgresql 8.2 DB in TT (there is a script named backup_database)
but it is hard for me to restore the same database on another machine or after reinstalling on the same machine (there is a lack of a such kind of script)
For instance:
dumping woks with:
SET PGPASSWORD=[Password from your backup_database.bat]
SET PGDATABASE=timetrex
"D:\Program Files\TimeTrex/postgresql\bin\pg_dump.exe" -d -f timetrex_database_%date%.sql -h localhost -U timetrex -p 5433
but
restore doesn`t work with:
"C:\program files\timetrex/postgresql\bin\pg_restore.exe" -d timetrex -h localhost -U timetrex -p 5433 C:\..........\timetrex_database_18.12.2008.sql
on another machine or after reinstalling on the same machine
The answer from CP is
...The systeem cannot find the path specified
There is also another problem when installing TT on another machine or after reinstalling on the same machine: the password of the new DB before restoring the old one is different and do not match.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

backup_database.bat

Code: Select all

@echo off
FOR /F "TOKENS=1* DELIMS= " %%A IN ('DATE/T') DO SET CDATE=%%B
FOR /F "TOKENS=1,2 eol=/ DELIMS=/ " %%A IN ('DATE/T') DO SET mm=%%B
FOR /F "TOKENS=1,2 DELIMS=/ eol=/" %%A IN ('echo %CDATE%') DO SET dd=%%B
FOR /F "TOKENS=2,3 DELIMS=/ " %%A IN ('echo %CDATE%') DO SET yyyy=%%B
SET date=%yyyy%%mm%%dd%
SET PGPASSWORD=<database password from timetrex.ini.php>
SET PGDATABASE=timetrex
"c:\program files\timetrex\postgresql\bin\pg_dumpall.exe" -i -c -D -h localhost -U postgres -p 5433 > timetrex_database_%date%.sql
restore_database.bat

Code: Select all

@echo off
SET PGPASSWORD=<database password from timetrex.ini.php>
SET PGDATABASE=timetrex

IF "%1" == "" GOTO NOFILE
    echo.
    echo Attempting to restore SQL dump file: %1...
    echo.
    echo.
    echo -----WARNING-----WARNING-----WARNING-----WARNING-----
    echo.
    echo RESTORING THIS FILE WILL COMPLETELY OVERWRITE ALL EXISTING DATA...
    echo.
    echo ARE YOU SURE YOU WANT TO DO THIS?
    echo.
    echo -----WARNING-----WARNING-----WARNING-----WARNING-----
    echo.

    pause
    echo.
    echo NO REALLY, ALL EXISTING DATA WILL BE DELETED.
    echo.
    echo ARE YOU REALLY SURE YOU WANT TO DO THIS?
    echo.
    pause

    "C:\program files\timetrex\postgresql\bin\psql.exe" -1 -f "%1" -h localhost -U postgres -p 5433 template1
    echo Done.
    echo.

    GOTO END
:NOFILE
  echo.
  echo ERROR: Please specify the SQL dump file that you wish to restore.
:END
How to use the restore_database.bat file:

restore_database <.SQL file from backup_database.bat>

For example:

restore_database timetrex_database_20081215.sql

Early in 2009 TimeTrex will come with a completely rewritten installer that will include both of these files.
Last edited by shaunw on Fri Dec 19, 2008 9:15 am, edited 1 time in total.
gherghel
Posts: 16
Joined: Thu Dec 18, 2008 6:53 am
Location: Romania

Post by gherghel »

wrong
"c:\program files\timetrex\bin\pg_dumpall.exe" -i -c -D -h localhost -U postgres -p 5433 > timetrex_database_%date%.sql
[/code]
good:

"c:\program files\timetrex\postgresql\bin\pg_dumpall.exe" -i -c -D -h localhost -U postgres -p 5433 > timetrex_database_%date%.sql
gherghel
Posts: 16
Joined: Thu Dec 18, 2008 6:53 am
Location: Romania

Post by gherghel »

backup works with CP instructions:

SET PGPASSWORD=<database password from timetrex.ini.php>
SET PGDATABASE=timetrex
"C:\Program files\TimeTrex\postgresql\bin\pg_dumpall.exe" -i -c -D -h localhost -U postgres -p 5433 > timetrex_database_%date%.sql

and it is a more larger database then with CP instructions:

SET PGPASSWORD=<database password from timetrex.ini.php>
SET PGDATABASE=timetrex
"C:\Program Files\TimeTrex\postgresql\bin\pg_dump.exe" -d -f timetrex_database_%date%.sql -h localhost -U timetrex -p 5433
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

I updated the paths in the original post to better reflect what they are likely to be. They may be different on different systems though, so keep that in mind. Fortunately the new installer will be able to detect this and adjust for it automatically.

The new backup_database.bat file does dump slightly more information, but its got nothing to do with TimeTrex, its all just other database related stuff that makes it easier to restore later on.
gherghel
Posts: 16
Joined: Thu Dec 18, 2008 6:53 am
Location: Romania

Post by gherghel »

Backup is case closed but restore still remains open.
CP instructions:
SET PGPASSWORD=<database password from timetrex.ini.php>
SET PGDATABASE=timetrex
"C:\Program Files\TimeTrex\postgresql\bin\psql.exe" -1 -f "%1" -h localhost –w -U postgres -p 5433 template1

gives me
psql: FATAL: password authentication failed for user "postgres"

Teach me more intuitive to restore with a simple method timetrex_database_19.12.2008.sql
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

It appears that the password you are using is incorrect. Please make sure you are using the correct password.
gherghel
Posts: 16
Joined: Thu Dec 18, 2008 6:53 am
Location: Romania

Post by gherghel »

But I don't know:
1. What password do I need for user "postgres"
2. Where shall I insert the password ?
3. The password for timetrex DB is it the new one, which I intend to overwrite, or the old one, which I intend to restore ?
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Its the password for the new database that you need. This can often be found in the timetrex.ini.php file in your new installation.

The password must be inserted here:
SET PGPASSWORD=<database password from timetrex.ini.php>
For example:
SET PGPASSWORD=AFDSF7834R3
gherghel
Posts: 16
Joined: Thu Dec 18, 2008 6:53 am
Location: Romania

Post by gherghel »

But I still don't know:
1. What password do I need for user "postgres"
2. Where shall I insert the password ?
gherghel
Posts: 16
Joined: Thu Dec 18, 2008 6:53 am
Location: Romania

Post by gherghel »

On http://forums.timetrex.com/viewtopic.ph ... ht=restore shaunw wrote:
Try using pg_restore.exe to restore the dump.

Something like this should work:
Code:

"C:\program files\timetrex/postgresql\bin\pg_restore.exe" -d timetrex -h localhost -U timetrex -p 5433 C:\timetrexbu2.sql


and I tried with

SET PGPASSWORD=<database password from timetrex.ini.php>
SET PGDATABASE=timetrex
"C:\program files\timetrex\postgresql\bin\pg_restore.exe" -d timetrex -h localhost -U timetrex -p 5433 C:\Documents and Settings\Horatiu Gherghel\timetrex_database_19.12.2008.sql

and the answer is:

pg_restore: [archiver] could not open input file: No such file or directory

It seems that I have bad luck !
gherghel
Posts: 16
Joined: Thu Dec 18, 2008 6:53 am
Location: Romania

Post by gherghel »

Can we conclude that the restoring operation is not fixed yet ?
Program is great but restoring database still remains the main issue.
Last edited by gherghel on Sun Dec 21, 2008 7:37 pm, edited 1 time in total.
gherghel
Posts: 16
Joined: Thu Dec 18, 2008 6:53 am
Location: Romania

succes

Post by gherghel »

Finally, after learning to deal with batch files and MS-DOS commands, I made the RESTORE.
Shaunw, you are a professionist. Whitout your assistance I never manage to GET THROUGH.
JeffersonKim
Posts: 26
Joined: Wed Aug 20, 2008 12:33 pm
Contact:

Post by JeffersonKim »

I'm getting this error when utilizing the restore_database.bat

It's a 11 MB sql dump.

I tried doing a copy and paste of what was coming up as it scrolled through quickly and there's much more of these items in a similar pattern.

Anyone know what these errors mean?

d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12622: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12623: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12624: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12625: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12626: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12627: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12628: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12629: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12630: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12631: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12632: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12633: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12634: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12635: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12636: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12637: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12638: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12639: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12640: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12641: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12642: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12643: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12644: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12645: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12646: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12647: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12648: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12649: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12650: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12651: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12652: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12653: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12654: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12655: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12656: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12657: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12658: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12659: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12660: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12661: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12662: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12663: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12664: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12665: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12666: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12667: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12668: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12669: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12670: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12671: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12672: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12673: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12674: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12675: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12676: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12677: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12678: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12679: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12680: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12681: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12682: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12683: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12684: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12685: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12686: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12687: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12688: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12689: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12690: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12691: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12692: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12693: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12694: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12695: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12696: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12697: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12698: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12699: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12700: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12701: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12702: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12703: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12704: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12705: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12706: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12707: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:12708: ERROR: current transaction is aborte
d, commands ignored until end of transaction block




^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39606: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39607: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21258, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39607: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39608: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21259, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39608: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39609: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21260, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39609: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39610: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21261, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39610: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39611: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21262, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39611: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39612: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21263, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39612: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39613: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21264, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39613: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39614: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21265, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39614: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39615: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21266, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39615: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39616: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21267, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39616: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39617: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21268, 0, 1, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39617: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39618: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21269, 0, 2, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39618: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39619: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21270, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39619: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39620: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21271, 0, 3, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39620: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39621: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21272, 0, 4, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39621: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39622: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21273, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39622: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39623: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21274, 0, 5, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39623: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39624: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21275, 0, 6, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39624: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39625: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21276, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39625: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39626: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21277, 0, 9, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39626: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39627: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...NTO system_log VALUES (21278, 0, 10, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39627: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39628: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21279, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39628: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39629: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39630: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21281, 0, 8, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39630: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39631: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21282, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39631: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39632: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21283, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39632: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39633: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21284, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39633: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39634: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21285, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39634: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39635: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21286, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39635: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39636: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21287, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39636: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39637: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21288, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39637: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39638: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21289, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39638: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39639: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21290, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39639: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39640: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21291, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39640: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39641: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21292, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39641: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39642: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21293, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39642: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39643: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21294, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39643: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39644: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21295, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39644: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39645: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21296, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39645: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39646: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21297, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39646: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39647: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21298, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39647: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39648: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21299, 0, 7, 'cron', 500, 'Executing...
^
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
psql:timetrex_database_20090105.sql:39648: ERROR: current transaction is aborte
d, commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:39649: WARNING: nonstandard use of \\ in a
string literal
LINE 1: ...INTO system_log VALUES (21300, 0, 7, 'cron', 500, 'Executing...
^
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Unfortunately none of those are actual errors, they are just stating that an error occurred earlier and the transaction was aborted.

If you can copy and paste the first error that occurred it would help. Also make sure you are restoring to a completely clean/fresh database, otherwise errors will occur.
JeffersonKim
Posts: 26
Joined: Wed Aug 20, 2008 12:33 pm
Contact:

Post by JeffersonKim »

shaunw wrote:Unfortunately none of those are actual errors, they are just stating that an error occurred earlier and the transaction was aborted.

If you can copy and paste the first error that occurred it would help. Also make sure you are restoring to a completely clean/fresh database, otherwise errors will occur.
C:\Program Files\TimeTrex\postgresql\bin>restore_database timetrex_database_2009
0105.sql
Attempting to restore SQL dump file: timetrex_database_20090105.sql...

-----WARNING-----WARNING-----WARNING-----WARNING-----
RESTORING THIS FILE WILL COMPLETELY OVERWRITE ALL EXISTING DATA...
ARE YOU SURE YOU WANT TO DO THIS?
-----WARNING-----WARNING-----WARNING-----WARNING-----
Press any key to continue . . .
NO REALLY, ALL EXISTING DATA WILL BE DELETED.
ARE YOU REALLY SURE YOU WANT TO DO THIS?
Press any key to continue . . .
SET
SET
SET
SET
SET
COMMENT
psql:timetrex_database_20090105.sql:22: ERROR: language "plpgsql" already exist
s
psql:timetrex_database_20090105.sql:25: ERROR: current transaction is aborted,
commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:27: ERROR: current transaction is aborted,
commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:29: ERROR: current transaction is aborted,
commands ignored until end of transaction block
psql:timetrex_database_20090105.sql:51: ERROR: current transaction is aborted,
commands ignored until end of transaction block
JeffersonKim
Posts: 26
Joined: Wed Aug 20, 2008 12:33 pm
Contact:

Post by JeffersonKim »

I'm thinking from the error message that I need to somehow clear out language "plpgsql" but I'm not exactly sure how I would do that.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

You could also check in the dump file for something along the lines of:

CREATE LANGUAGE

Then remove the entire line. Though this could cause other problems too, make sure you have a copy of the dump file before modifying it.
JeffersonKim
Posts: 26
Joined: Wed Aug 20, 2008 12:33 pm
Contact:

Post by JeffersonKim »

shaunw wrote:You could also check in the dump file for something along the lines of:

CREATE LANGUAGE

Then remove the entire line. Though this could cause other problems too, make sure you have a copy of the dump file before modifying it.
Thanks. That seemed to had worked and concurs with what Mike from tech support recommended.

I'm now working with them to combine the new and the old timetrex.ini.php so that I can access this transferred database on the new machine.

My old machine has died :(
JeffersonKim
Posts: 26
Joined: Wed Aug 20, 2008 12:33 pm
Contact:

Post by JeffersonKim »

Props to Mike Benoit on making it work from the paid tech support.

It turns out I used an old version of backup_database.bat to make my SQL backup. So when I was trying to use the above listed restore_database.bat there was a database mismatch which caused my problems.

Mike had to remote into my computer and type in a bunch of code to get the databases to match up.
Locked