Thursday, 21 June 2018 12:55

BackupPC and Volume Shadow Copy Services (VSS)

Rate this item
(0 votes)

BackupPC can be a very daunting task when first starting out, but as many people who have installed it multiple times will say, it's not that bad, but it does take some time to figure out.  One of my sayings (as I may have said before), "It's easy, if you know how to do it," meaning it's not easy, if you don't. :)  BackupPC is one of them, but don't fear, if you work through the issues, you'll make it. Additionally, my plan is to write my notes how I install it in a future post.

For those that get it running, the first thing they'll notice is that it doesn't copy open files.  So, for those computers where the backup begins and people are working on stuff, open files are not backed up, i.e., Outlook Files or open Office documents.  This bugged me because I was and I am a BackupPC fan.  I scoured the internet in search of an easy way (emphasis on easy) to have BackupPC copy open files on Windows Computers.  Well, in my search, I didn't find an easy one, so I went on a development spree to try and figure out a way to do it.  It took a few weeks of trial and error, but I can now say, there is an easy way to do it.

Over the years, what I did grew into a hodge podge of files in a folder and a few batch files.  These past few weeks, I decided to try and put them together into one interface.  I wanted to use AutoIt, but the compressed executable, although doesn't have viruses, is flagged by many Antivirus programs as having one just because it was compressed by AutoIt.  I didn't want to keep answering the question, "Does it contain viruses," so I opted to use Visual Basic, instead.  So, below is what has been developed.  From my experience, this solution runs on anything after Windows 7.  I've, successfully, run this solution on Windows 7/8/10 without problems.

This is the first version of the GUI, so there may be a few bugs. If you find one or more, please post it in the comments below.

Additionally, I uploaded the exe's to  They have passed all virus checks.  I would encourage you to do the same, if you decide to use these files.  I can, personally, attest that I did not write any backdoors nor viruses in these files.  These are clean and feel free to use them, if you like.


 VSSBackupPC 1.1


VSSBackupPC is designed to be used with the BackupPC server software.  This app uses Volume Shadow Copy Services so the server can backup open files on the C:\ drive.  To accomplish this, it uses Cygwin and Rsync for the data transfer.

I tried to make this as easy as possible.  I know it's a lot of writing below, but, in reality, there are only a few settings.

This app is written in Visual Basic and the .Net Framwork version 4.6.1 is needed to run it.

The Welcome window

Select the resource zip file that is included in the download.

The contents of the resource file is below.

When the app is started, it creates a folder called: C:\rsyncd.   This is a hard coded folder and cannot be changed.

All files related to this app will be created and placed in this folder.


Enter the rsync user name and password.  It should be the same as used on the BackupPC server in these fields: RsyncdUserName, RsyncdPassword

As you hover over the window, if a secret file is found, it will display: Secrets File Exists.  If not, it displays: No Secrets File

Click the Add button to create the file and/or add credentials to an existing one

To find more information about the secrets file, check the client setup on the BackupPC website.



See website for more information about this file.

1.  RsyncShareName = [Module Name]

Should be the same as the one added in BackupPC. Case matters, so UserFolder and userfolder are different.

2.  Choose the Local Backup Path.

Do Not Use VSS: Checking this box will force BackupPC to use the actual folder and will not copy open files.  At this point, drives other than C: are not included in the Shadow folder.

3.  Comment:  A short comment, like "User Folder"

4.  BackupPC Server IP Address: The ‘Allowed host(s)’ to access the PC and run rsync remotely

Strict Modes, Read Only, and List: Consult the samba website above for more information

As you hover over the window, if a rsync.conf file is found, it will display: Conf File Exists.  If not, it displays: No Conf File

5.  ‘Load Defaults’ will place default values in the fields and check boxes.  Edit the RsyncShareName, Host IP Address, and/or Path.  Then, you're set.


Manually Edit Rsyncd.Conf

You can manually edit the rsyncd.conf file.  This is not necessary nor encouraged, but is built-in to help with advanced configurations.

Task Settings

1.  Renew VSS Folder every 'x' hours

Default = 6 hours.   Set the time (in hours) that the script looks at the Time Stamp on the Shadow folder. When the time has exceeded, the Shadow Folder is removed and recreated.

2.  Only Allow VSS Backup Tasks to Run on AC Power?

Default = Yes.   To allow the VSSBackukpPC scheduled tasks to run if the laptop is running on batteries, uncheck the box.  If checked, the Scheduled Tasks will only run while the computer is plugged in.  (Thanks to agu for finding this setting)


Install Services

1.  Type the Host IP Network.  Only type the first three octets of the network.  There are a few drop down examples, but you can type any IP address that is needed.1  For example:

2.  Select the Subnet Mask of the Network.  The default is 24 (

3. ‘Install Services.  This will open two command windows and install the services needed to run VSSBackupPC.

4.  If needed, the ‘Remove Services’ button will remove the services so the C:\rsyncd folder can be deleted.

When VSSBackupPC starts, it checks for a running process of rsync on startup.  If it finds one, it will display a message asking to remove the service if it needs to be installed again.  You do not have to remove the service if you only need to change the secrets or conf file.

1This network is added to the Private firewall profile to allow port 873 and pings through it. The script does not change the public profile in any way so make sure the computer is in the private firewall profile

The resource zip file contains 8 files as seen to the right.  The Cygwin files can be found on the internet as well as the vshadow,exe file.  removevss.exe and vss-backuppc.exe were written in Visual Basic to handle the logic.

All files have been uploaded and checked at  Feel free to upload them to check yourself.  There are no Viruses or Backdoors written in the code.

There is one, additional, thing you have to do on the BackupPC server, but it's not difficult.

1.  Add a DumpPreUserCmd script to the BackupPC server.

Create a folder that is accessible by the backuppc user, for example, choose to create a 'scripts' subfolder where backuppc resides

In the folder, create two files:

  2. pass

2.    Replace <Enter_Secrets_File_UserName> with the user name used above in the secrets file.

3.  pass  (used in  Enter the secrets password used in the secrets file. Nothing else, no brackets, etc.

4.  In the DumpPreUserCmd field, type:

sh + the path to the + space + $host

Ex: sh /media/backup/scripts/ $host



echo "I am the dumppresharecmd for BackupPC..."
echo "======================================="
rsync --dry-run --password-file=/media/backup/scripts/pass rsync://<Secrets_File_UserName>@$1/cDrive

#Ex. rsync --dry-run --password-file=/media/backup/scripts/pass rsync://SUser@$1/cDrive

echo "Waiting 60 seconds.  Giving time to create shadow copy"
sleep 60
echo "all Done."
echo "======================================"


2.  pass
# =======================
#Ex.   mysecretpass
# =======================


Some notes:

A VSS folder called c:\shadow is created.  This is where BackupPC is directed. 

Additionally, the script creates a logfile called: vsslog.log and is found in the C:\rsyncd folder.  When the logfile reaches 2MB, it is deleted and recreated.

I hope this makes sense and may even help someone down the road.  If there are any questions, bugs, or comments, leave them below.

As always, enjoy!

VSSBackupPC.exe and the file can be downloaded here:


Read 2938 times Last modified on Saturday, 27 April 2019 00:34


  • Comment Link Admin Wednesday, 06 February 2019 23:55 posted by Admin


    Wow. Thank you for finding the 6 minute bug! You are right. I've changed it to hours and have uploaded a new version. Since you already have it running, you'll just need to replace the vss-backuppc.exe in C:\rsyncd with the one found in the new resource zip file. Let me know if anything else isn't working. I won't be able to test this until tomorrow.

    I'm wondering if the problem with the first two times you installed it, it wasn't installed with enough permissions. The removevss.exe is started from Task Manager (at logon) so it needs to be installed with enough Privileges/Permissions to be able to create the task. If it was installed with enough permissions, maybe the task wasn't created for some unknown reason.

    Glad you got it working and thank you for your posts. Please post again, if you find anything else.

    I want this to be useful.

  • Comment Link Agu Friday, 08 February 2019 20:03 posted by Agu

    Hi, thanks. Would it be possible checking the download link? It seems that it is the same file. As a suggestion, you could add a version number to the name of the ZIP file.
    Thank you.

  • Comment Link Admin Saturday, 09 February 2019 05:16 posted by Admin

    Yes, I thought about adding a version number, but I was in a hurry. The vss-backuppc.exe is the newer version in the Zip file. I think the time stamp should be within the past few days, but I don't know if it will be reflected after extracting the zip file. I'll make a change on the webpage.

    Thanks and let me know if you find anything else.

  • Comment Link Agu Friday, 08 March 2019 02:59 posted by Agu

    Hi, I think I figured out why sometimes removevss.exe was not runing at logon. The sheduled task "Remove VSS logon" had the condition "Start only if computer is on AC power" enabled, so it was not starting when runing laptop on battery.

  • Comment Link Admin Saturday, 09 March 2019 21:45 posted by Admin

    Great! I think you are right.
    I did some research and it looks like I'll need to rework the code to add this on installation. So, at this point and until i can find time to update it, I'll add a note in the instructions to uncheck the two Power options settings in task scheduler.
    Next version coming soon...
    Thank you for the comments!

  • Comment Link Andreas Neubauer Friday, 12 April 2019 12:49 posted by Andreas Neubauer

    I would like to make backups every 1 hour. That means I would need to change the hard coded 6 hour.
    Will this be implement in the next future ?

  • Comment Link Admin Tuesday, 16 April 2019 21:12 posted by Admin

    I'm working on an update that will include this option, the option to select a different subnet mask, and an updated Task to allow the task to run on batteries. I should have it uploaded by next week.

  • Comment Link MJ Saturday, 31 August 2019 04:12 posted by MJ

    Hi !
    Thanks a lot for this nice wrap-up of scripts and tools to make it easier !

    There is a major problem whith the vss-end.cmd script as it deletes ALL shadow copies of the C drive. More secure as you may want to keep some snapshots for the C drive for diffrent reasons. Here is my little correction so that only the generated set will get ereased.

    cd c:\rsyncd
    call setvar1.cmd
    vshadow.exe -dx=%shadow_set_id%
    rmdir c:\shadow

  • Comment Link Admin User Tuesday, 03 September 2019 03:11 posted by Admin User

    Thank you for the comment. I like it!
    Personally, I've never kept extra snapshots, but I, certainly, understand the reasons why. I'll look at getting this in the next update.
    Thank you for using program and making it better!


Leave a comment

Because of spammers, I've changed the comments so they do not auto-show, but if you leave a comment, it should post within 24 hours.