rsnorris
Joined: 06 Apr 2011 Posts: 3
|
Posted: Thu Feb 07, 2013 12:18 am Post subject: Warning 130: MOVETO error: Failed to move file |
|
|
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? |
|
petey
Joined: 24 Apr 2005 Posts: 2218
|
Posted: Thu Feb 07, 2013 2:36 am Post subject: |
|
|
| Quote: |
| Is there anyway to make the MOVETO overwrite an existing file |
Use FILEOPTIONS = 4, e.g.
| Code: |
| EXEC master..sqlbackup '-sql "RESTORE ... WITH MOVETO = ..., FILEOPTIONS = 4"' |
| Quote: |
| 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 |
|
rsnorris
Joined: 06 Apr 2011 Posts: 3
|
Posted: Thu Feb 07, 2013 2:48 pm Post subject: |
|
|
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. |
|