What are the challenges you face when working across database platforms? Take the survey
Options

ERASEFILES causes backup error

beachldybeachldy Posts: 17
edited June 28, 2012 10:03AM in SQL Backup Previous Versions
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.

Comments

Sign In or Register to comment.