Synch job copies files, then deletes files next time run

Use this forum for help with AISBackup
Post Reply
DnlPbl
Posts: 32
Joined: Mon Oct 24, 2005 9:57 pm

Synch job copies files, then deletes files next time run

Post by DnlPbl »

AISBackup Ver: 2.1.0.250

Windows:
XP Pro
Version 2002
Service Pack 2


"Backup To:" does not appear
Backup Destination: C:\Documents and Settings\Daniel\My Documents\Data\Archive\Settings

This is a copy job which synchs various files on the local hard drive to a central place on the same hard drive.
It works perfectly aside from being tempermental about two files:
filename.MDF
filename.LDF

Yes, these are SQL Server database files, but the problem is not that they don't copy. They copy fine; then the next time the files are deleted from the destination, as if they're no longer at the source. But that's not the case.

Run job, they copy to destination; run job again, they're deleted from destination. Back and forth.
This continued even after I shut down all SQL Server services listed in the task manager.
DnlPbl
Posts: 32
Joined: Mon Oct 24, 2005 9:57 pm

Post by DnlPbl »

I just upgraded to 2.2.0.262.

I thought this might fix this issue, but it does not.
Any suggestions?

Thanx
Barry
Site Admin
Posts: 1529
Joined: Tue Aug 20, 2002 3:16 pm

Missing files after synchronize

Post by Barry »

Hi

A few questions to save a little time to setting up a similar environment here:

Are the files actually called 'filename.MDF' and 'filename.LDF'? Is there any special signifiance to these files or are they part of one of your databases? What are the SQL server and Operating system versions? Are the files definately not transient, i.e created and deleted as part of a SQL server database? (I guess not or you would not be posting the question)

Barry
DnlPbl
Posts: 32
Joined: Mon Oct 24, 2005 9:57 pm

Post by DnlPbl »

Hi

No. The actual filenames are "CreativeManager.MDF" and "CreativeManager.LDF" - CreativeManager is the name of the database.

These files constitute the database. The MDF contains the core content and the LDF is its log file. The files are not transient.

SQL Server 2000
MS Windows XP Pro SP2

Thank you
Barry
Site Admin
Posts: 1529
Joined: Tue Aug 20, 2002 3:16 pm

Post by Barry »

I have been able to create a scenario where this problem occurs:

Version 2.1 could not copy SQL database files if SQL Server was running, if the files were copied successfully (without SQL Server running) and then copied while SQL Server was running the original destination files would be incorrectly deleted. An update has just been made to AISBackup 2.2 so that the destination files are not deleted until after the source files have been opened successfully.

Version 2.2 of AISBackup could copy the files while SQL Server is running under Windows XP, Windows Server 2003 and Windows Vista but only if the Manage Backup / Change Synchronize (Backup / Job Settings / Backup Opened Exclusive Files is selected. (There must be at least 1 NTFS drive on the system for VSS to work). Setting this option in version 2.2 should enable the synchronize to work.

I do have one concern: You said that closing SQL server causes the files to be deleted / replaced, the thing is after the files are put back AISBackup should not detect any changes in the destination files and report: “There are no New, Changed or Deleted Files Selected to Synchronize”.

Is this a one way synchronize job?

Barry
DnlPbl
Posts: 32
Joined: Mon Oct 24, 2005 9:57 pm

Post by DnlPbl »

"Version 2.1 could not copy SQL database files if SQL Server was running, if the files were copied successfully (without SQL Server running) and then copied while SQL Server was running the original destination files would be incorrectly deleted."

Maybe I've misunderstood, but this sounds contradictory.

"An update has just been made to AISBackup 2.2 so that the destination files are not deleted until after the source files have been opened successfully."

Maybe another misunderstanding, but why should the files ever be deleted without according user instructions?

"Version 2.2 of AISBackup could copy the files while SQL Server is running under Windows XP, Windows Server 2003 and Windows Vista but only if the Manage Backup / Change Synchronize (Backup / Job Settings / Backup Opened Exclusive Files is selected."

The sync IS working while SQL Server is running. The only issue is that they're intermittently deleted.

"You said that closing SQL server causes the files to be deleted / replaced,..."

Sorry, but I don't recall saying that and I don't see that in the thread.. SQL Server does NOT delete these files. AISBackup deletes the files, every other time the synch job is run.

Yes, this is a one-way synch job.
Sorry for all the confusion.

Thanx
Barry
Site Admin
Posts: 1529
Joined: Tue Aug 20, 2002 3:16 pm

Post by Barry »

My statements that appear to be contradictory are as a result of the destination file been deleted before AISBackup attempts to copy the source file. If the source file is not accessible then the destination file is incorrectly deleted. This is fixed in the next version of 2.2 (from build 263).
"You said that closing SQL server causes the files to be deleted / replaced,..."

Sorry, but I don't recall saying that and I don't see that in the thread.. SQL Server does NOT delete these files. AISBackup deletes the files, every other time the synch job is run.
This is me misunderstanding (and misquoting): :oops:
This continued even after I shut down all SQL Server services listed in the task manager.
However, my reply is probably incorrect if you were using AISBackup to stop the services, as the SQL data files probably change each time SQL Server is started.

Barry
DnlPbl
Posts: 32
Joined: Mon Oct 24, 2005 9:57 pm

Post by DnlPbl »

I see. While using 2.2, I was not stopping the SQL Server services. So your fix sounds good.

Thanx
Barry
Site Admin
Posts: 1529
Joined: Tue Aug 20, 2002 3:16 pm

Files deleting

Post by Barry »

This problem has been identified and happens when only a few files from a folder have been selected, the files that did not change were deleted in error. The fix will be in build 265.

This problem has identified another problem with exclusively opened files:

The operating system shows the file details prior to opening and unless the file grows or decreases in size AISBackup will not detect a change in the file. To get around this problem with SQL server database files an option has been added to always backup opened exclusive files.

This option may be set when the job is created or via Manage Backup / Change Job Settings / Opened Exclusive... Always Backup (or Copy)

Barry
Post Reply