@@ -26,6 +26,7 @@ ALTER PROCEDURE dbo.sp_AllNightLog_Setup
2626 @Debug BIT = 0 ,
2727 @FirstFullBackup BIT = 0 ,
2828 @FirstDiffBackup BIT = 0 ,
29+ @MoveFiles BIT = 1 ,
2930 @Help BIT = 0 ,
3031 @Version VARCHAR (30 ) = NULL OUTPUT,
3132 @VersionDate DATETIME = NULL OUTPUT,
7273 * Holds variables used by stored proc to make runtime decisions
7374 * RTO: Seconds, how often to look for log backups to restore
7475 * Restore Path: The path we feed to sp_DatabaseRestore
76+ * Move Files: Whether to move files to default data/log directories.
7577 * dbo.restore_worker
7678 * Holds list of databases and some information that helps our Agent jobs figure out if they need to look for files to restore
7779
@@ -102,6 +104,7 @@ BEGIN
102104 @UpdateSetup BIT, defaults to 0. When set to 1, will update existing configs for RPO/RTO and database backup/restore paths.
103105 @RPOSeconds BIGINT, defaults to 30. Value in seconds you want to use to determine if a new log backup needs to be taken.
104106 @BackupPath NVARCHAR(MAX), This is REQUIRED if @Runsetup=1. This tells Ola' ' s job where to put backups.
107+ @MoveFiles BIT, defaults to 1. When this is set to 1, it will move files to default data/log directories
105108 @Debug BIT, defaults to 0. Whent this is set to 1, it prints out dynamic SQL commands
106109
107110 Sample call:
@@ -619,6 +622,8 @@ BEGIN
619622 INSERT msdb .dbo .restore_configuration (database_name, configuration_name, configuration_description, configuration_setting)
620623 VALUES (' all' , ' log restore path' , ' The path to which Log Restores come from.' , @RestorePath);
621624
625+ INSERT msdb .dbo .restore_configuration (database_name, configuration_name, configuration_description, configuration_setting)
626+ VALUES (' all' , ' move files' , ' Determines if we move database files to default data/log directories.' , @MoveFiles);
622627
623628 IF OBJECT_ID(' msdb.dbo.restore_worker' ) IS NULL
624629
0 commit comments