database backups empty after upgrade to 7.0.1

Ask your questions regarding TimeTrex installation here.
Locked
stevez
Posts: 4
Joined: Sun Jul 07, 2013 9:11 pm

database backups empty after upgrade to 7.0.1

Post by stevez »

I recently upgraded from v.5.3.3 to v7.0.1. Originally, I was running v5.3.3 on a Windows XP SP3 32-bit VM. I followed the migrate TimeTrex On-Site from on computer to another word for word and successfully moved to a new install of Windows Server 2008 R2 64-bit VM...or so it seemed. The .sql files from the nightly backups have no data. My install works fine, can log in, all my data seems to be there, add employees, clock in/out, etc. Something else I found to be kind of odd, the postgresql folder doesn't seem to be changing the date modified. The cache folder seems to be the only thing changing. I've checked that the password located in the timetrex.ini and the backup_database.bat are the same. Am I missing something?

--as a side note, I attempted to upgrade the install on the old VM and it failed miserably...very similar to another thread I was reading (lost track of which thread it was, sorry). Failed to restore the db and a couple other errors. Not that I'm particularly concerned with that one though...that VM will be put to rest soon.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: database backups empty after upgrade to 7.0.1

Post by shaunw »

If you edit your backup_database.bat file and remove the @echo off line at the top, then run that file from the command prompt window, can you copy and paste the exact output here?
stevez
Posts: 4
Joined: Sun Jul 07, 2013 9:11 pm

Re: database backups empty after upgrade to 7.0.1

Post by stevez »

C:\TimeTrex>FOR /F "TOKENS=1* DELIMS= " %A IN ('DATE/T') DO SET CDATE=%B

C:\TimeTrex>SET CDATE=07/08/2013

C:\TimeTrex>FOR /F "TOKENS=1,2 eol=/ DELIMS=/ " %A IN ('DATE/T') DO SET mm=%B

C:\TimeTrex>SET mm=07

C:\TimeTrex>FOR /F "TOKENS=1,2 DELIMS=/ eol=/" %A IN ('echo 07/08/2013 ') DO SET
dd=%B

C:\TimeTrex>SET dd=08

C:\TimeTrex>FOR /F "TOKENS=2,3 DELIMS=/ " %A IN ('echo 07/08/2013 ') DO SET yyyy
=%B

C:\TimeTrex>SET yyyy=2013

C:\TimeTrex>SET date=20130708

C:\TimeTrex>SET PGPASSWORD=eec0b7e9c

C:\TimeTrex>SET PGDATABASE=timetrex

C:\TimeTrex>"C:/TimeTrex/postgresql\bin\pg_dumpall.exe" -i -c -D -h localhost -U
postgres -p 5433 1>"C:\TimeTrex\timetrex_database_20130708.sql"
C:/TimeTrex/postgresql\bin\pg_dumpall.exe: illegal option -- D
Try "pg_dumpall --help" for more information.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: database backups empty after upgrade to 7.0.1

Post by shaunw »

Try removing the "-D" option from the pg_dumpall command in the backup_database.bat file, then try it again.
stevez
Posts: 4
Joined: Sun Jul 07, 2013 9:11 pm

Re: database backups empty after upgrade to 7.0.1

Post by stevez »

I removed the -D and ran the backup, now i get an .sql file that is 42,768KB...normally, my backups are 147,309KB...? Would that have anything to do with all of today's changes going into the cache and not into the postgresql?
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: database backups empty after upgrade to 7.0.1

Post by shaunw »

You could replace the "-D" with "--column-inserts" and the sizes should be a little closer.
stevez
Posts: 4
Joined: Sun Jul 07, 2013 9:11 pm

Re: database backups empty after upgrade to 7.0.1

Post by stevez »

Sorry, meant to post this earlier and got side tracked.

Right on...now my backup is 344 KB larger than the previous as to be expected. Thank you.
Locked