Red Gate forums :: View topic - ERASEFILES causes backup error
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

ERASEFILES causes backup error

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



Joined: 14 Sep 2005
Posts: 10

PostPosted: Thu Jun 28, 2012 2:16 pm    Post subject: ERASEFILES causes backup error Reply with quote

This is the backup script and it fails since adding the ERASEFILES items.

EXEC master..sqlbackup N'-SQL "BACKUP DATABASES [MYDB] TO DISK = ''F:\MSSQL\BACKUP\<AUTO>''
WITH NAME = ''<AUTO>'', DESCRIPTION = ''<AUTO>'', COMPRESSION = 3 , ERASEFILES = 3, FILEOPTIONS = 1, ERASEFILES_REMOTE = 3",@exitcode OUTPUT, @sqlerrorcode OUTPUT

I've tried omitting the ERASEFILES_REMOTE, omitting the ERASEFILES, omitting the FILEOPTIONS, and none of these work.
Back to top
View user's profile Send private message
ChrisAVWood



Joined: 18 Dec 2007
Posts: 308
Location: Edmonton, Alberta, CANADA

PostPosted: Thu Jun 28, 2012 2:36 pm    Post subject: Reply with quote

You are missing a ' at the end.

It should read ERASEFILES_REMOTE = 3'"

There was the ' before -SQL "BACKUP that you have no ending ' for.

Chris
_________________
English DBA living in CANADA
Back to top
View user's profile Send private message
beachldy



Joined: 14 Sep 2005
Posts: 10

PostPosted: Thu Jun 28, 2012 3:03 pm    Post subject: Reply with quote

THANK YOU! I thought I counted all the quotes....but missed one.
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