Red Gate forums :: View topic - Warning 130: MOVETO error: Failed to move file
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Backup 7
SQL Backup 7 forum

Warning 130: MOVETO error: Failed to move file

Search in SQL Backup 7 forum
Post new topic   Reply to topic
Jump to:  
Author Message
rsnorris



Joined: 06 Apr 2011
Posts: 3

PostPosted: Thu Feb 07, 2013 12:18 am    Post subject: Warning 130: MOVETO error: Failed to move file Reply with quote

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?
Back to top
View user's profile Send private message
petey



Joined: 24 Apr 2005
Posts: 2277

PostPosted: Thu Feb 07, 2013 2:36 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
rsnorris



Joined: 06 Apr 2011
Posts: 3

PostPosted: Thu Feb 07, 2013 2:48 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
meastland



Joined: 28 Mar 2011
Posts: 36

PostPosted: Mon Sep 09, 2013 10:59 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group