olahallengren / sql-server-maintenance-solution

SQL Server Maintenance Solution
https://ola.hallengren.com
MIT License
2.91k stars 756 forks source link

Error while backing up to multiple network folders #495

Closed xAnder1402 closed 2 years ago

xAnder1402 commented 3 years ago

Don't work: @Directory = '\RESERVE\mssqlbackup$, \RESERVE\mssqlbackupmirror$', @MirrorDirectory = 'F:\MSSQL\BACKUP',

Don't work: @Directory = 'F:\MSSQL\BACKUP', @MirrorDirectory = '\RESERVE\mssqlbackup$, \RESERVE\mssqlbackupmirror$',

Don't work: @Directory = 'F:\MSSQL\BACKUP, \RESERVE\mssqlbackup$', @MirrorDirectory = '\RESERVE\mssqlbackupmirror$',

Working: @Directory = 'F:\MSSQL\BACKUP', @MirrorDirectory = '\RESERVE\mssqlbackupmirror$',

olahallengren commented 2 years ago

This is working as designed.

We are here using backup mirroring and backup striping together.

The number of striped directories (comma in between) has to be the same for the directory and the mirror directory.

So this should also work:

@Directory = 'F:\MSSQL\BACKUP, \RESERVE\mssqlbackup$',
@MirrorDirectory = '\RESERVE\mssqlbackupmirror$, \RESERVE\mssqlbackupmirror2$',

I will improve the error message for this.

olahallengren commented 2 years ago

I have improved the error message here. https://ola.hallengren.com/versions.html