Quantcast
Channel: All Data Protection posts
Viewing all articles
Browse latest Browse all 3480

Scheduling clones in PowerShell

$
0
0

I need to clone a set of databases from one SQL instance to another, and refresh them every 6 hours. Right now I'm doing it with SnapManager for SQL, but I'm trying to migrate it to SnapCenter. It looks like GUI will only let me schedule one database at a time, which is not optimal when I have eight of them sharing a LUN. With PowerShell, I almost have it - it clones all the DBs I need, but only once - I need to add the 'refresh every 6 hours' part. What I have right now is:

 

Add-SmCloneJob -CloneJobName SQL_clone_to_reports -PluginCode SMSQL -CloneToInstance 'SQL2\REPORT' -CloneToHost sql2.domain.local -Resources @{'Host'='sql1.domain.local';'Type'='SQL Database';'Names'='SQL1\PROD\DB1,SQL1\PROD\DB2,SQL1\PROD\DB3,SQL1\PROD\DB4,SQL1\PROD\DB5,SQL1\PROD\DB6,SQL1\PROD\DB7,SQL1\PROD\DB8'} -AutoAssignMountPoint

However, when I try to add '-schedules' to the command, I just get syntax errors. What's the proper format to have it run at 3:30 AM, 9:30 AM, 3:30 PM and 9:30 PM?

 

Thank you.


Viewing all articles
Browse latest Browse all 3480

Trending Articles