Warning 130: MOVETO error: Failed to move file

Compresses, encrypts, secures and monitors SQL Server backups.

Moderators: JonathanWatts, Chris Auckland, eddie davis, Colin Millerchip, Brian Harris, james.billings, RBA, petey

Warning 130: MOVETO error: Failed to move file

Postby rsnorris » Thu Feb 07, 2013 12:18 am

I am occasionally getting the error "Warning 130: MOVETO error: Failed to move file....(The file exists.)"

The log file of the previous log restore reports that the moveto completed successfully.

Successful restore log file extract:

06/02/2013 06:54:45: Moved LOG_GAII_Build_20130206064000.sqb to \\\\ggnas1\\SQLBackup\\LogShipping\\GI\\.
06/02/2013 06:54:45: Restoring GAII_Build_GI (transaction logs) from:
06/02/2013 06:54:45: E:\\Logship\\FromGib\\LOG_GAII_Build_20130206065000.sqb

06/02/2013 06:54:45: RESTORE LOG [GAII_Build_GI] FROM VIRTUAL_DEVICE = 'SQLBACKUP_BA3265BC-89A4-47BC-97A4-245F3EE3D10D', VIRTUAL_DEVICE = 'SQLBACKUP_BA3265BC-89A4-47BC-97A4-245F3EE3D10D01', VIRTUAL_DEVICE = 'SQLBACKUP_BA3265BC-89A4-47BC-97A4-245F3EE3D10D02', VIRTUAL_DEVICE = 'SQLBACKUP_BA3265BC-89A4-47BC-97A4-245F3EE3D10D03' WITH BUFFERCOUNT = 24, BLOCKSIZE = 65536, MAXTRANSFERSIZE = 1048576 , STANDBY = N'E:\\SQLBackup\\Undo_GAII_Build_GI.dat'

06/02/2013 06:54:48: Processed 0 pages for database 'GAII_Build_GI', file 'GAII_Primary' on file 1.
06/02/2013 06:54:48: Processed 0 pages for database 'GAII_Build_GI', file 'Session' on file 1.
06/02/2013 06:54:48: Processed 0 pages for database 'GAII_Build_GI', file 'AccountJournal' on file 1.
06/02/2013 06:54:48: Processed 0 pages for database 'GAII_Build_GI', file 'Indexes' on file 1.
06/02/2013 06:54:48: Processed 0 pages for database 'GAII_Build_GI', file 'CLUSINDEXES' on file 1.
06/02/2013 06:54:48: Processed 0 pages for database 'GAII_Build_GI', file 'TextAndBlob' on file 1.
06/02/2013 06:54:48: Processed 0 pages for database 'GAII_Build_GI', file 'HEAP' on file 1.
06/02/2013 06:54:48: Processed 305 pages for database 'GAII_Build_GI', file 'GAII_build_log' on file 1.
06/02/2013 06:54:48: RESTORE LOG successfully processed 305 pages in 0.093 seconds (25.584 MB/sec).

[b]06/02/2013 06:54:48: Moved LOG_GAII_Build_20130206065000.sqb to \\\\ggnas1\\SQLBackup\\LogShipping\\GI\\.[/b]


Subsequent log file extract:
06/02/2013 07:04:01: Restoring GAII_Build_GI (transaction logs) from:
06/02/2013 07:04:01: E:\\Logship\\FromGib\\LOG_GAII_Build_20130206065000.sqb

06/02/2013 07:04:01: ALTER DATABASE [GAII_Build_GI] SET ONLINE RESTORE LOG [GAII_Build_GI] FROM VIRTUAL_DEVICE = 'SQLBACKUP_8912C898-F5B2-4A1E-BB96-7700CA896065', VIRTUAL_DEVICE = 'SQLBACKUP_8912C898-F5B2-4A1E-BB96-7700CA89606501', VIRTUAL_DEVICE = 'SQLBACKUP_8912C898-F5B2-4A1E-BB96-7700CA89606502', VIRTUAL_DEVICE = 'SQLBACKUP_8912C898-F5B2-4A1E-BB96-7700CA89606503' WITH BUFFERCOUNT = 24, BLOCKSIZE = 65536, MAXTRANSFERSIZE = 1048576 , STANDBY = N'E:\\SQLBackup\\Undo_GAII_Build_GI.dat'

06/02/2013 07:04:45: Processed 0 pages for database 'GAII_Build_GI', file 'GAII_Primary' on file 1.
06/02/2013 07:04:45: Processed 0 pages for database 'GAII_Build_GI', file 'Session' on file 1.
06/02/2013 07:04:45: Processed 0 pages for database 'GAII_Build_GI', file 'AccountJournal' on file 1.
06/02/2013 07:04:45: Processed 0 pages for database 'GAII_Build_GI', file 'Indexes' on file 1.
06/02/2013 07:04:45: Processed 0 pages for database 'GAII_Build_GI', file 'CLUSINDEXES' on file 1.
06/02/2013 07:04:45: Processed 0 pages for database 'GAII_Build_GI', file 'TextAndBlob' on file 1.
06/02/2013 07:04:45: Processed 0 pages for database 'GAII_Build_GI', file 'HEAP' on file 1.
06/02/2013 07:04:45: Processed 305 pages for database 'GAII_Build_GI', file 'GAII_build_log' on file 1.
06/02/2013 07:04:45: RESTORE LOG successfully processed 305 pages in 0.123 seconds (19.344 MB/sec).

[b]06/02/2013 07:04:46: Warning 130: MOVETO error: Failed to move file: E:\\Logship\\FromGib\\LOG_GAII_Build_20130206065000.sqb (The file exists.)
[/b]

Is there anyway to make the MOVETO overwrite an existing file, or having an error reported if the delete part of the move does not complete successfully?
rsnorris
 
Posts: 3
Joined: Wed Apr 06, 2011 4:57 pm

Postby petey » Thu Feb 07, 2013 2:36 am

Is there anyway to make the MOVETO overwrite an existing file

Use FILEOPTIONS = 4, e.g.

Code: Select all
EXEC master..sqlbackup '-sql "RESTORE ... WITH MOVETO = ..., FILEOPTIONS = 4"'


having an error reported if the delete part of the move does not complete successfully?

It isn't possible currently. Windows reports that the move succeeded, but SQL Backup does not actually check if the source file still exists.
Peter Yeoh
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 7
petey
 
Posts: 2233
Joined: Sun Apr 24, 2005 12:34 pm

Postby rsnorris » Thu Feb 07, 2013 2:48 pm

Thank you for this information Petey.

It's worth noting that this information is not included in the documentation for the RESTORE command, this states the for FILEOPTIONS: Valid values are 1, 2, and 3.
rsnorris
 
Posts: 3
Joined: Wed Apr 06, 2011 4:57 pm

Postby meastland » Mon Sep 09, 2013 10:59 pm

Peter - Are there any plans to include an option in a future release to force the removal of a source file even if the destination file already exists in a MOVETO configuration?
meastland
 
Posts: 37
Joined: Mon Mar 28, 2011 5:56 pm


Return to SQL Backup 7

Who is online

Users browsing this forum: No registered users and 0 guests