Giter VIP home page Giter VIP logo

crashplan-docker-synology's Introduction

crashplan-docker-synology

Join the chat at https://gitter.im/ajkerrigan/crashplan-docker-synology

Update: The End of CrashPlan for Home

As of 2017-August-22, Code42 no longer offers CrashPlan for Home. Existing subscriptions will be honored through October of 2018 (see this announcement for more information).

Running CrashPlan from a NAS has always been a neglected use case from a support perspective, so this move isn't all that surprising. Still, this leaves a question for those of us currently relying on CrashPlan for Home... what do we do instead?

Like many of you, I'll be revisiting other backup options that I previously rejected and many new ones that have arisen over the past few years.

FernandoMiguel has created an excellent sheet comparing various cloud backup/storage offerings. I hope that it is useful to the rest of you who are planning your migrations.

Overview

This is an attempt to get CrashPlan running on a Synology NAS inside a Docker container. It has been tested successfully in the following configurations:

DSM Version: 6.0-7321

Device RAM
Synology DS713+ 4GB
Synology DS412+ 2GB

I have been running the PC Load Letter CrashPlan Packages for a long time. They certainly made it much easier to deal with CrashPlan updates, but it was still fairly common for me to have issues after new releases. When I had issues with the 4.4.1 release, I decided to see if Docker would be a smoother way forward.

Assumptions and Precautions

This documentation assumes that:

  • You have a CrashPlan account, a Synology device and some experience using them together
  • Your Synology device supports Docker (check compatibility here)
  • You are comfortable connecting to your Synology device using SSH and running terminal commands
  • Docker experience shouldn't be necessary, but can't hurt :)

Before trying to run CrashPlan in a Docker container, it's a good idea to:

  • Back up your CrashPlan configuration files related to any currently installed instances of CrashPlan, in case you decide to switch back to your previous setup
  • Stop or uninstall existing CrashPlan instances

Installation

  • Install the Docker package via the DSM Package Manager
  • Stop any existing CrashPlan instances
  • SSH to your Synology NAS
  • Clone this repository to /root
    • Note: If you don't have git installed, install the ipkg package manager and install it.
    • ipkg install help here
  • Symbolically link the start up script
    • ln -s /root/crashplan-docker-synology/S99crashplandocker.sh /usr/local/etc/rc.d/S99crashplandocker.sh
  • Review the predefined variables in the S99crashplandocker.sh script. If you have different locations for your installation, you will need to update the variables.
    • Copy the user variables file to /root
      • cp /root/crashplan-docker-synology/cp-user-vars.sh /root
    • Edit /root/cp-user-vars.sh
    • Save the file
  • Run /usr/local/etc/rc.d/S99crashplandocker.sh start to start the container.
  • Wait 10-20 seconds
  • Run /usr/local/etc/rc.d/S99crashplandocker.sh status to see the running state of the container
    • This command also shows the authorization token required for accessing the CrashPlan UI from a remote computer
  • Connect to the headless service using CrashPlan Desktop on a remote computer.
    • See CrashPlan's documentation for help with this, and consult /usr/local/etc/rc.d/S99crashplandocker.sh status for details about the running CrashPlan instance.

Upgrading

The CrashPlan service running in your Docker container will update itself automatically. However, follow the steps below to make sure the Docker image is up to date.

  • To check for updates to the Docker image, run docker pull ajkerrigan/crashplan

  • If the image was updated, run /usr/local/etc/rc.d/S99crashplandocker.sh recreate to create and start a container based on the new image.

  • Note: It's a good idea to run the steps above after upgrading DSM (for example, after moving from DSM 5.2 to 6.0).

Customization

This script can be customized to suit your specific needs. Customization is done within the cp-user-vars.sh file which should be located in /root. The options most likely to need tweaking are:

  • USER_VOLUMES: The -v options passed to the docker run command. These control the paths that will be mounted inside the container.
  • CRASHPLAN_DIR: The CrashPlan home/installation directory. When switching from an existing install of CrashPlan, pointing this variable to your current installation may avoid the need to "adopt" the previous installation from the CrashPlan client.
  • DATA_DIR: The destination for incoming backups. Setting this to a data directory from an existing installation will save some time synchronizing backup progress.

Caveats

  • Because this script sets up mounted volumes that are not accessible from the DSM GUI, trying to manage this container from the Synology Docker GUI will break it. Checking status and resource utilization with the GUI is fine, but trying to start the container from the GUI will break the volume configuration. If that happens, remove the container and run /usr/local/etc/rc.d/S99crashplandocker.sh start again to set it up anew.

  • Anytime the container stops and restarts, it's going to overwrite the .ui_info file. That file contains an authentication token GUID that needs to be the same on the CrashPlan Desktop client and the server. Before trying to start your CrashPlan client, run /usr/local/etc/rc.d/S99crashplandocker.sh status and take note of the Auth Token. Use that to update the .ui_info file on your client machine. See CrashPlan's documentation for headless computers for more information.

Acknowledgements

  • gfjardim's Docker Image for CrashPlan (https://hub.docker.com/r/gfjardim/crashplan/) was an excellent starting point. I forked it into the ajkerrigan/crashplan image with the expectation that I'd tweak things as I went along.

  • patters over at PC Load Letter is a damn hero. He has been wrestling with getting CrashPlan to work on Synology devices for years, and has done a lot of work so that people like me could be lazier. He accepts donations, and damn well deserves them. His CrashPlan packages are the only reason I haven't given up running CrashPlan on my NAS by now.

  • Scott Hanselman's blog post is an excellent walkthrough of getting CrashPlan installed and running. His post is very readable and supported by plenty of screenshots.

Troubleshooting

  • Running CrashPlan on a Synology device has always been a quirky endeavor. I believe Docker removes some of the wonkiness, but I'm sure there are issues I haven't run into yet. I am not an expert on this stuff, but I've broken and fixed enough CrashPlan installations that I'm familiar with some of the ways things break. If you have issues you can't fix on your own, please open an issue in GitHub and I'll try to help.

Contributing

  • Do you have suggestions for how this script can be better written or better documented? Please open an issue, or fix it yourself and submit a pull request.

Additional Resources

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.