Backup issue

xdaixdai Posts: 98
edited January 19, 2011 4:01PM in SQL Backup Previous Versions
Hi, we are using 6.4 version, and here is the command

-SQL "BACKUP DATABASES [di_repo,etl_stage,parameters_bi,son_db_bi] TO DISK = 'F:\MSSQL.1\MSSQL\Backup\<AUTO>.sqb' WITH ERASEFILES = 5h, ERASEFILES_REMOTE = 4, MAILTO = '[email protected]', DISKRETRYINTERVAL = 30, DISKRETRYCOUNT = 10, COMPRESSION = 2, COPYTO = 'H:\MSSQL\Backup', THREADCOUNT = 23 "

though i specify the folder which backup copy to, should still remain 4 days copy(ERASEFILES_REMOTE = 4), but it still remove all, why is that?

thanks

Comments

  • Eddie DEddie D Posts: 1,666 Rose Gold 5
    Thank you for your post into the forum.

    I see from your script that the TO DISK path and the COPYTO path are both local disk paths.

    When this occurs, the ERASEFILES parameter overrides the ERASEFILES_REMOTE parameter, so that both locations use the ERASEFILES parameter.

    If you set the COPYTO path to be the expected network share in unc path format, \\server\share_name, the ERASFILES_REMOTE parameter will be used.

    Many Thanks
    Eddie
    Eddie Davis
    Product Support Engineer
    Redgate Software Ltd
    Email: [email protected]
Sign In or Register to comment.