Results 1 to 10 of 10

Thread: Database Backup Problem

  1. #1
    Join Date
    Apr 2010
    Posts
    11

    Default Database Backup Problem

    I have my TCW database on a shared server. The database has become corrupted twice in the last few months. After waiting a week for our IT people to restore it, I started using the backup feature in the TCW Admin.

    The database became corrupted again last Friday. When I restored the file, it was from a different day. I then went and looked at all of the other backups. The compressed folders are created sometime after 3:30 PM, but the backups are from early in the morning. This happens every time. If we do a backup and then do it a second time, the database inside of the folder gets refreshed with the correct and current time, and the data inside is up to the minute.

    Why is this happening? It's as if the database being backed up is from the database at the start of the day and is stuck in some memory loop. Doing a second backup seems to flush the old one out with the active one. I'm now doing a double backup in the morning and at the end of the day to two separate backup locations. I'm using the current version of TCW 1.0.55 and No...I did not restore the database from the wrong backup folder.

  2. #2
    Join Date
    Aug 2002
    Posts
    3,314

    Default

    The database backup can only occur when you manually use the backup tool, it cannot do it without a human factor. And when you do backup, it creates the ZIP file and in addition to the file name it adds the date so you know which is the most current database. Also it is *not* a good idea to make the backups on the computer as if the hard drive is having problems, you can loose the date altogether. Always backup to a removable drive.

    Also when restoring, you should close all TimeClockWindow applications on all computers as they may lock the database prohibiting the restore.
    Paul Mayer
    ZPAY Payroll Systems, Inc.

  3. #3
    Join Date
    Apr 2010
    Posts
    11

    Default Clarification

    I am using the backup tool. I am backing up to a networked server hard drive that's located on a different server from the server hard drive that houses the active TCW database. That's not the issue. Also, I am not restoring with with other TCW applications opened. The database is not being locked when I restore it.

    The issue is what's happening as I described in my original email with the backup tool creating a backup that is not the point-in-time-now version of the database.

  4. #4
    Join Date
    Aug 2002
    Posts
    3,314

    Default

    I cannot replicate the problem that you explained. I even tested by making a backup to keep first. Then I renamed that backup.

    Then I made a backup again. Next I went in and deleted an employee and made another backup. (Note that the backups made on the same date overwrite the previous backup on that date.) Now if what you described, when I restored I should have seen the employee that I deleted, but not so, the employee was missing.

    Unless you have some sort of security on that server that is prohibiting you to replace an existing file, it's impossible to do what you said happened.
    Paul Mayer
    ZPAY Payroll Systems, Inc.

  5. #5
    Join Date
    Apr 2010
    Posts
    11

    Default More

    Thanks for your incite Paul. On the assumption that our server has some kind of a security feature, I went to my PC, where I had originally started saving the backups. I found the same issue. I am sending you the zipped file separately so you can see what I mean. The folder created by the TCW backup tool shows a time of 5:42 PM, but the database inside shows a backup time of 8:15 AM.

    It's as if TCW takes a picture of the database when the program first loads, hold it in memory and uses that for the backup tool when it's first employed for the day. Upon doing a second backup, the first one is flushed out of memory and is replaced with the new version of the database.

  6. #6
    Join Date
    Aug 2002
    Posts
    3,314

    Default

    I received the backup ZIP and that is the first time I've ever seen a TCW backup ZIP with sub-folders in it. We don't have a clue how you are getting those as our backup process does not do anything in memory, it opens a Zip file on the backup drive and copies the TCW database into the ZIP.

    Do this, take a USB memory stick and backup to it and then look in the ZIP file. Let me know if you ended up with anything inside of it besides the database.

    We've been using the same code in all of our software since December of 1999 on over 7,000 customers computers and I've never seen what you are getting there.
    Paul Mayer
    ZPAY Payroll Systems, Inc.

  7. #7
    Join Date
    Aug 2002
    Posts
    3,314

    Default

    More from the backup ZIP you sent me. I took this strange backup file and opened it in Access to see what was what.

    The database in the sub-folder named restored_from_tape was very old. The last punch was 7/25/2011 at 4:00:03 PM

    The one that appeared to be what I'd expect in the ZIP file was dated 8/15/2011 at 4:00:14 PM

    Neither is current if the backups were supposedly made today.
    Paul Mayer
    ZPAY Payroll Systems, Inc.

  8. #8
    Join Date
    Apr 2010
    Posts
    11

    Default Same Result

    I did a backup to a removable drive.

    Folder has a time of 2:21PM and database has a time of 9:33 AM. I just did this backup using the TCW backup tool.

    I'm sending you the file from my USB memory stick.

  9. #9
    Join Date
    Aug 2002
    Posts
    3,314

    Default

    Looking at your database, only two employees punched in this morning at 8AM, they have not yet punched out. Looking at the other days, three punched in and out yesterday, the day before three so this looks normal.

    The time stamp on the database is the last activity that it saw, not the time it was backed up. So this looks as expected.

    Unless you have multiple databases on different computers for other employees. Is that the case? The normal setup is one database shared across the network.
    Paul Mayer
    ZPAY Payroll Systems, Inc.

  10. #10
    Join Date
    Aug 2002
    Posts
    3,314

    Default

    I received your last screenshot. The database time stamp only changed when it is accessed. This is like when you start up TCW.exe, an employee punches in or out or you edit a record in TCWA.exe.

    So when a backup is made, it retains the last time stamp it had from one of those activities. Since the data connection is closed when you made a backup and then restarted again after you are done, it once again changed the time stamp so your second backup is different.

    You just need to know how the Microsoft ADO data access tools work. This is normal and expected.
    Paul Mayer
    ZPAY Payroll Systems, Inc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •