locked
Enable Snapshot Schedule for Volume Shadow Copy (2008 Core) RRS feed

  • Question

  • My file server is a Windows Server 2008 Core R2 machine with system data on the c: drive and fileshares on the d: drive.

    We were formerly using Windows Server 2003's Volume Shadow Copy/Previous Versions capabilities, and the snapshots were taken at 7:30am and 12:30pm Monday through Friday.

    I am trying to figure out how to do this on Server 2008 Core. I have enabled shadow storage on D:, and can create single snapshots by issuing vssadmin Create Shadow /for=D:. However, when I try to schedule the command with at, it doesn't work (no snapshot is created) and I don't see anything in the logs.

    How do I schedule VSC snapshots on Core?
    Monday, September 28, 2009 5:08 PM

Answers

  • Hi,

     

    I perform the tests while using at command and it works properly. Here is my scenario:

     

    1.    Create a VSS.bat file on C: drive with content “vssadmin create shadow /for=D:”

    2.    Run at 16:00 C:\VSS.bat

     

    By the way, I’d like to confirm whether you have started the task schedule.

     

    How to Create a Scheduled Task

     

    1. Click Start, point to Programs, point to Accessories, and then click Command Prompt.
    2. At the command prompt, type the following line, and then press ENTER to display a list of currently running services: net start

    If Task Scheduler is not displayed in the list, type the following line, and then press ENTER: net start "task scheduler"

    1. At the command prompt, type the following line (use the parameters that are appropriate to your situation), and then press ENTER: at \\computername time /interactive | /every:date,... /next:date,... command

     

    For more information, you can refer to:

     

    How To Use the AT Command to Schedule Tasks

    http://support.microsoft.com/kb/313565/en-us

     

     

    Best Regards,

    Vincent Hu

     

    Tuesday, September 29, 2009 8:19 AM

All replies

  • Hi,

     

    I perform the tests while using at command and it works properly. Here is my scenario:

     

    1.    Create a VSS.bat file on C: drive with content “vssadmin create shadow /for=D:”

    2.    Run at 16:00 C:\VSS.bat

     

    By the way, I’d like to confirm whether you have started the task schedule.

     

    How to Create a Scheduled Task

     

    1. Click Start, point to Programs, point to Accessories, and then click Command Prompt.
    2. At the command prompt, type the following line, and then press ENTER to display a list of currently running services: net start

    If Task Scheduler is not displayed in the list, type the following line, and then press ENTER: net start "task scheduler"

    1. At the command prompt, type the following line (use the parameters that are appropriate to your situation), and then press ENTER: at \\computername time /interactive | /every:date,... /next:date,... command

     

    For more information, you can refer to:

     

    How To Use the AT Command to Schedule Tasks

    http://support.microsoft.com/kb/313565/en-us

     

     

    Best Regards,

    Vincent Hu

     

    Tuesday, September 29, 2009 8:19 AM
  • Thank you for your quick response, Vincent!

    I have created a file, c:\vsc-snap.bat, with the following lines:
    @echo off
    vssadmin.exe Create Shadow /for=D:
    Testing on the command line gives the following after a small wait:
    vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool
    (C) Copyright 2001-2005 Microsoft Corp.
    
    Successfully created shadow copy for 'd:\'
        Shadow Copy ID: {5fce2281-921c-47d2-b491-af955d97a1c6}
        Shadow Copy Volume Name: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy6
    When I issue the net start command, Task Scheduler is displayed in the list of started services.

    I also used the at command to schedule the running of the task:
    C:\Users\cghota>at 07:00 /every:M,T,W,Th,F "C:\vsc-snap.bat"
    Added a new job with job ID = 1
    
    C:\Users\cghota>at 12:30 /every:M,T,W,Th,F "C:\vsc-snap.bat"
    Added a new job with job ID = 2
    
    C:\Users\cghota>at
    Status ID   Day                     Time          Command Line
    --------------------------------------------------------------------
            1   Each M T W Th F         7:00 AM       C:\vsc-snap.bat
            2   Each M T W Th F         12:30 PM      C:\vsc-snap.bat
    Does this look correct?
    Tuesday, September 29, 2009 1:26 PM
  • Hi,

     

    According to the description, it seems “vssadmin create shadow” works properly, there is no mistake with your at command.

     

    Please perform the following steps to do a test to narrow down the issue.

     

    1.    Create a dir.bat file on D:\ drive with content “dir c:\ > d:\dir.txt”

    2.    Open an elevated CMD command line, run “at 10:00 D:\dir.bat”

    Note: Please change the time 10:00 base on your current time(i.e. if your current time is 10:00, you can change it to 10:03, then you can see the result soon)

     

    Best Regards,

    Vincent Hu

     

    Tuesday, September 29, 2009 2:17 PM
  • Thank you so much, the solution above worked.

    For some reason, scheduling using this command DID NOT WORK:

    • at 07:00 /every:M,T,W,Th,F "vssadmin Create Shadow /for=d:"

    However this schedule DID work:

    • at 07:00 /every:M,T,W,Th,F "C:\vsc-snap.bat"
    Tuesday, September 29, 2009 8:05 PM
  • Hi,

     

    Glad to see that you have resolved the issue.

     

    Best Regards,

    Vincent Hu

     

    Wednesday, September 30, 2009 2:07 AM