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 = 'xdai@fulbright.com', 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
xdai
0

Comments

1 comment

  • Eddie D
    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 D
    0

Add comment

Please sign in to leave a comment.