|
|
|
|||||||
|
ICT-Hotlist TopicHow to copy Shadow Copy Volume/Previous versions schedules between servers?Why Copy?Previous versions is a very handy feature that let your end-users restore deleted and corrupted files or even compare older version of the files themselves.However the user interface to plan a schedule for the previous versions snapshots is a cumbersome process involving a lot of mouse-clicks and is error prone. How it works.The Previous Versions functionality on a server is based on the Windows Task Scheduler and the Volume Shadow Copy Service(VSS). This means that the task running the VSS/Previous version can be located, extracted and a changed version imported on a different target server. The following text describes all the necessary steps in detail to be very clear, the required procedure is quite simple.Copy procedure.In this example you have a destination server that needs the previous versions configured and you have a correctly working previous versions configuration on your source server.Step 1: Configure Shadow Copies on your Destination server.In Explorer right click the drive on your Destination server you want to store the previous versions and configure it by clicking "Properties". Select the tab "Shadow Copies", click on the drive and click the "Enable" button. When you click the "Settings..." button, in the appearing window next click the "Schedule" button and you will notice the two default schedules at 7:00 and 12:00 hours on every working day. Click the "OK" button repeatedly to close all the windows. You now have configured the default schedule.How to match the {Volume-code} with your drive?Should you have multiple tasks for different disks, how can you match a Shadow Copy Volume/Previous versions task with a disk drive letter? The command line program mountvol (Windows 2000 and newer) shows you the relations between the Volume-code and your disks.Step 2: Find the VSS/Previous version scheduled task.Start the "Task Scheduler" and navigate to "Task Scheduler Library". In the detail window you will notice a task called: "ShadowCopyVolume{Volume-code}" The Volume-code is a unique disk identifier.Now right click the "ShadowCopyVolume{Volume-code}" task and select "Export..." and select a location to save the XML file. For clarity prefix the file with your Destination server name. Make a backup or copy of this file. Step 3: Export the configuration from your Source server.Perform the previous step also on your source server but save the file on your Destination server (Also use the source server name in the file name to easily distinguish between the xml files)Step 4: Edit the Destination and Source XML files.Now open your favorite text editor (I use NotePad++) and open the source file. Now select and copy everything between the XML tags:
<Triggers>
Now open your Destination file, select everything between the XML tags:
. . . </Triggers>
<Triggers>
paste everything and save the file (overwrite the Destination xml file).
. . . </Triggers> Step 5: Import the changed Destination task.On the destination server open the "Task Scheduler" and navigate to "Task Scheduler Library".Locate the task "ShadowCopyVolume{Volume-code}", right click it, select "Delete" and click "Yes" to remove the task. Click on "Task Scheduler Library" to select it, right click and select "Import Task..." In the Open file browser, select your changed destination XML file, click "Open" to open the file. In the "Create Task" window, rename the task so the destination server name is removed and you keep the name "ShadowCopyVolume{Volume-code}". Next click the tab "Triggers" to validate the correct schedule. Click the "OK" button to close and save the imported task. Step 6: Validate the Shadow Copies schedule.Right click the drive on your Destination server that stores your previous versions and check the configuration by clicking "Properties". Select the tab "Shadow Copies", click on the drive and click the "Settings..." button, and in the appearing window next click the "Schedule" button and you will notice the schedules loaded. Click the "OK" button repeatedly to close all the windows. You now have configured the schedule.In case of error."In Spite Of All The Danger" we have prepared ourself by backing up or copying the "<destination server name>ShadowCopyVolume{Volume-code}.xml" file. Just load this file in Step 5 to restore the base functionality.
You may vote your opinion about this article:
Scripts and programming examples disclaimerUnless stated otherwise, the script sources and programming examples provided are copyrighted freeware. You may modify them, as long as a reference to the original code and hyperlink to the source page is included in the modified code and documentation. However, it is not allowed to publish (copies of) scripts and programming examples on your own site, blog, vlog, or distribute them on paper or any other medium, without prior written consent.Many of the techniques used in these scripts, including but not limited to modifying the registry or system files and settings, impose a risk of rendering the Operating System inoperable and loss of data. Make sure you have verified full backups and the associated restore software available before running any script or programming example. Use these scripts and programming examples entirely at your own risk. All liability claims against the author in relation to material or non-material losses caused by the use, misuse or non-use of the information provided, or the use of incorrect or incomplete information, are excluded. All content is subject to change and provided without obligation. |