How to use Duplicati to take OfficeClip backup on the cloud

Reading Time: 3 minutes

Image by -JvL- from Flickr Creative Commons

Duplicati is an open source, powerful backup software on the cloud. It can take
backups to various storage clouds like Google drive, Amazon S3, Microsoft OneDrive,
ftp etc. It supports full and incremental backup.

OfficeClip develops free basic and enterprise edition of the Contact Manager (CRM), project management and
support ticket software suite that can be installed on private clouds like amazon Ec2.
This article will show how to backup OfficeClip sql database, documents and code files using Duplicati and amazon s3 cloud.

[more]

  1. Download the latest version of Duplicati on your OfficeClip server from duplicati.com and
    install it on the computer where OfficeClip is installed.

  2. Before using Duplicati to take OfficeClip backup it is important to check some settings.
    This is because OfficeClip users Sql Server database which is locked when the sql server is running.
    Duplicati uses Volume Snapshot Services (VSS) to get around copying locked files.

    1. Open a windows command prompt as an administrator (right click on the icon and select Run As
      Administrator) and run the command “vssadmin list providers”.
      If it shows the provider as Microsoft Software Shadow Copy provider then it is running fine, skip to step 3. If it gives error, read on:
    2. Check if the VSS Service is enabled, to do this:
      1. Right click on “My Computer”.
      2. Select “Manage”.
      3. Select the “Services” tree node.
      4. Right click on “Volume Shadow Copy”
      5. Select Properties
      6. Change the startup type to “Automatic” (Note that sometimes this service gets
      7. switched on automatically when VSS runs)

      8. Rerun “vssadmin list providers” on the command prompt as in the previous step,
        if it still does not run then follow this article later on how to run duplicati using command prompt.

  3. Make sure microsoft visual c++ redistributable package (x64) is installed on your machine.
    OfficeClip installation program installs this component. If you do not find it,
    install it from the microsoft site.

  4. Upon installation duplicati will automatically start on your windows taskbar.
    Click on the icon to open the duplicati user interface.

  5. On the Duplicati user interface click on the Duplicati wizard link to start the new wizard.

  6. Click on Schedule a New Backup and click Next

  7. Give a name to the backup and click Next

  8. Select Custom folder list and then select the folder where OfficeClip is installed.
    If you have set the OfficeClip database manually then add that location too and click Next.

  9. Select if you want to encrypt the backup, if you select a password then you must remember it.
    Otherwise the backup cannot be recovered if you lost the duplicati settings. Click Next.

  10. Next select a location for backup, we will select amazon S3 in this example. Click Next

  11. Now you will need to sign in to amazon s3 cloud to get the access id and the secret key.
    Note that amazon charges a fee for storage and communication with their cloud (around $0.03 per GB/ month)
    but they have a free tier that will give you around 5GB of space. Click Next

  12. Checkmark the box that says:
    1. Select when and how often the backup should run
    2. Select when to remove the backup
    3. Manually override settings

  13. Click Next and select when to run the backup and then click Next

  14. Next select how many backups you want to keep and then click Next

  15. Scroll down to the snapshot-policy and then type required in the value field and click Next

  16. Verify the Summary and check mark the Run backup now checkbox

  17. Click on the command line tab and copy the command line text to a notepad. This is useful if the volume
    shadow copy (VSS) could not be activated on your machine and you have to run duplicati from command line as
    will be explained later.

  18. There is one more step left, Volume Shadow Service(VSS) only works in administrative mode and Duplicati
    runs on user mode, so we have to change this:

    1. In file manager go to:
      C:\Users\<user name>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
      (note that the AppData folder may be hidden so you may need to type the whole string on the address bar)
    2. Delete the shortcut for the Duplicati

    3. Now open the task scheduler from the control panel > Administrative Tools and use the following settings
      1. Create a New Task
      2. Set trigger to “At System Start Up”
      3. Set run as to Highest Privilege or as an administrator
      4. Set action as c:\program files\duplicati\duplicati.exe
    4. Restart the computer and verify from the taskbar that duplicati is running

When VSS cannot be enabled 

 
In some computers VSS cannot be enabled or it gives repeated error, duplicati can be run from a command prompt and setup using the task scheduler.

  1. Open the windows services from the Control Panel > Administrative Tools > Services
  2. Search for SQL Server (<instance name>) and note the name.

  3. Open the file in the notepad that you saved from the previous section
  4. Add the following lines to the beginning and the end
    1. net stop “SQL Server (<instance name>)”
    2. rest of the file
    3. net start “SQL Server (<instance name>)”
  5. Save the file with a .bat extension

  6. Now open the windows task scheduler from Control Panel > Administrative Tools and do the following settings:
    1. Set run as to Highest Privilege or as an administrator
    2. Set action as the program file that you just created
    3. Set the frequency and time of the backup