diff --git a/DOCKERHUB.md b/DOCKERHUB.md index 1ee60b7..839d35c 100644 --- a/DOCKERHUB.md +++ b/DOCKERHUB.md @@ -1,4 +1,4 @@ -# Docker container for CrashPlan PRO +# Docker container for CrashPlan [![Release](https://img.shields.io/github/release/jlesage/docker-crashplan-pro.svg?logo=github&style=for-the-badge)](https://github.com/jlesage/docker-crashplan-pro/releases/latest) [![Docker Image Size](https://img.shields.io/docker/image-size/jlesage/crashplan-pro/latest?logo=docker&style=for-the-badge)](https://hub.docker.com/r/jlesage/crashplan-pro/tags) [![Docker Pulls](https://img.shields.io/docker/pulls/jlesage/crashplan-pro?label=Pulls&logo=docker&style=for-the-badge)](https://hub.docker.com/r/jlesage/crashplan-pro) @@ -7,19 +7,22 @@ [![Source](https://img.shields.io/badge/Source-GitHub-blue?logo=github&style=for-the-badge)](https://github.com/jlesage/docker-crashplan-pro) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg?style=for-the-badge)](https://paypal.me/JocelynLeSage) -This is a Docker container for [CrashPlan PRO](https://www.crashplan.com). +This is a Docker container for [CrashPlan](https://www.crashplan.com). The GUI of the application is accessed through a modern web browser (no installation or configuration needed on the client side) or via any VNC client. +This Docker container can be used with all CrashPlan products: Essential, +Professional, Enterprise, MSPs and Small Business (no longer sold). + --- -[![CrashPlan PRO logo](https://images.weserv.nl/?url=raw.githubusercontent.com/jlesage/docker-templates/master/jlesage/images/crashplan-pro-icon.png&w=110)](https://www.crashplan.com)[![CrashPlan PRO](https://images.placeholders.dev/?width=416&height=110&fontFamily=monospace&fontWeight=400&fontSize=52&text=CrashPlan%20PRO&bgColor=rgba(0,0,0,0.0)&textColor=rgba(121,121,121,1))](https://www.crashplan.com) +[![CrashPlan logo](https://images.weserv.nl/?url=raw.githubusercontent.com/jlesage/docker-templates/master/jlesage/images/crashplan-pro-icon.png&w=110)](https://www.crashplan.com)[![CrashPlan](https://images.placeholders.dev/?width=288&height=110&fontFamily=monospace&fontWeight=400&fontSize=52&text=CrashPlan&bgColor=rgba(0,0,0,0.0)&textColor=rgba(121,121,121,1))](https://www.crashplan.com) -CrashPlan offers the most comprehensive online backup solution to tens of -thousands of businesses around the world. The highly secure, automatic and -continuous service provides customers the peace of mind that their digital life -is protected and easily accessible. +CrashPlan provides peace of mind through secure, scalable, and +straightforward endpoint data backup. We help organizations recover from +any worst-case scenario, whether it is a disaster, simple human error, a +stolen laptop, ransomware or an as-of-yet undiscovered calamity. --- @@ -29,7 +32,7 @@ is protected and easily accessible. The Docker command provided in this quick start is given as an example and parameters should be adjusted to your need. -Launch the CrashPlan PRO docker container with the following command: +Launch the CrashPlan docker container with the following command: ```shell docker run -d \ --name=crashplan-pro \ @@ -44,7 +47,7 @@ Where: - `/docker/appdata/crashplan-pro`: This is where the application stores its configuration, states, log and any files needing persistency. - `/home/user`: This location contains files from your host that need to be accessible to the application. -Browse to `http://your-host-ip:5800` to access the CrashPlan PRO GUI. +Browse to `http://your-host-ip:5800` to access the CrashPlan GUI. Files from the host appear under the `/storage` folder in the container. ## Documentation diff --git a/Dockerfile b/Dockerfile index a062ca8..9449fa3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ ARG CRASHPLAN_VERSION=11.2.0 ARG CRASHPLAN_BUILD=520 # Define software download URLs. -ARG CRASHPLAN_URL=https://download.crashplan.com/installs/agent/cloud/${CRASHPLAN_VERSION}/${CRASHPLAN_BUILD}/install/CrashPlanSmb_${CRASHPLAN_VERSION}_${CRASHPLAN_BUILD}_Linux.tgz +ARG CRASHPLAN_URL=https://download.crashplan.com/installs/agent/cloud/${CRASHPLAN_VERSION}/${CRASHPLAN_BUILD}/install/CrashPlan_${CRASHPLAN_VERSION}_${CRASHPLAN_BUILD}_Linux.tgz # Build CrashPlan. FROM ubuntu:22.04 AS crashplan @@ -39,9 +39,9 @@ RUN \ # Keep a copy of the default config. mv ${TARGETDIR}/conf /defaults/conf && \ # Make sure the UI connects by default to the engine using the loopback IP address (127.0.0.1). - sed-patch '/BUSINESS<\/orgType>/a \\t\n\t\t127.0.0.1<\/serviceHost>\n\t<\/serviceUIConfig>' /defaults/conf/default.service.xml && \ + sed-patch '/<\/serviceBackupConfig>/a \\t\n\t\t127.0.0.1<\/serviceHost>\n\t<\/serviceUIConfig>' /defaults/conf/default.service.xml && \ # Add the javaMemoryHeapMax setting to the default service file. - sed-patch '//i\\t' /defaults/conf/default.service.xml && \ + #sed-patch '//i\\t' /defaults/conf/default.service.xml && \ # Prevent automatic updates. rm -r /usr/local/crashplan/upgrade && \ touch /usr/local/crashplan/upgrade && chmod 400 /usr/local/crashplan/upgrade && \ @@ -83,14 +83,15 @@ COPY rootfs/ / # Set internal environment variables. RUN \ - set-cont-env APP_NAME "CrashPlan for Small Business" && \ + set-cont-env APP_NAME "CrashPlan" && \ set-cont-env APP_VERSION "$CRASHPLAN_VERSION" && \ set-cont-env DOCKER_IMAGE_VERSION "$DOCKER_IMAGE_VERSION" && \ true # Set public environment variables. ENV \ - CRASHPLAN_SRV_MAX_MEM=1024M + CRASHPLAN_SRV_MAX_MEM=1024M \ + CRASHPLAN_SERVER_ADDRESS= # Define mountable directories. VOLUME ["/storage"] @@ -98,7 +99,7 @@ VOLUME ["/storage"] # Metadata. LABEL \ org.label-schema.name="crashplan-pro" \ - org.label-schema.description="Docker container for CrashPlan PRO" \ + org.label-schema.description="Docker container for CrashPlan" \ org.label-schema.version="${DOCKER_IMAGE_VERSION:-unknown}" \ org.label-schema.vcs-url="https://github.com/jlesage/docker-crashplan-pro" \ org.label-schema.schema-version="1.0" diff --git a/README.md b/README.md index e07e7f4..60428c6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Docker container for CrashPlan PRO +# Docker container for CrashPlan [![Release](https://img.shields.io/github/release/jlesage/docker-crashplan-pro.svg?logo=github&style=for-the-badge)](https://github.com/jlesage/docker-crashplan-pro/releases/latest) [![Docker Image Size](https://img.shields.io/docker/image-size/jlesage/crashplan-pro/latest?logo=docker&style=for-the-badge)](https://hub.docker.com/r/jlesage/crashplan-pro/tags) [![Docker Pulls](https://img.shields.io/docker/pulls/jlesage/crashplan-pro?label=Pulls&logo=docker&style=for-the-badge)](https://hub.docker.com/r/jlesage/crashplan-pro) @@ -6,19 +6,22 @@ [![Build Status](https://img.shields.io/github/actions/workflow/status/jlesage/docker-crashplan-pro/build-image.yml?logo=github&branch=master&style=for-the-badge)](https://github.com/jlesage/docker-crashplan-pro/actions/workflows/build-image.yml) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg?style=for-the-badge)](https://paypal.me/JocelynLeSage) -This project implements a Docker container for [CrashPlan PRO](https://www.crashplan.com). +This project implements a Docker container for [CrashPlan](https://www.crashplan.com). The GUI of the application is accessed through a modern web browser (no installation or configuration needed on the client side) or via any VNC client. +This Docker container can be used with all CrashPlan products: Essential, +Professional, Enterprise, MSPs and Small Business (no longer sold). + --- -[![CrashPlan PRO logo](https://images.weserv.nl/?url=raw.githubusercontent.com/jlesage/docker-templates/master/jlesage/images/crashplan-pro-icon.png&w=110)](https://www.crashplan.com)[![CrashPlan PRO](https://images.placeholders.dev/?width=416&height=110&fontFamily=monospace&fontWeight=400&fontSize=52&text=CrashPlan%20PRO&bgColor=rgba(0,0,0,0.0)&textColor=rgba(121,121,121,1))](https://www.crashplan.com) +[![CrashPlan logo](https://images.weserv.nl/?url=raw.githubusercontent.com/jlesage/docker-templates/master/jlesage/images/crashplan-pro-icon.png&w=110)](https://www.crashplan.com)[![CrashPlan](https://images.placeholders.dev/?width=288&height=110&fontFamily=monospace&fontWeight=400&fontSize=52&text=CrashPlan&bgColor=rgba(0,0,0,0.0)&textColor=rgba(121,121,121,1))](https://www.crashplan.com) -CrashPlan offers the most comprehensive online backup solution to tens of -thousands of businesses around the world. The highly secure, automatic and -continuous service provides customers the peace of mind that their digital life -is protected and easily accessible. +CrashPlan provides peace of mind through secure, scalable, and +straightforward endpoint data backup. We help organizations recover from +any worst-case scenario, whether it is a disaster, simple human error, a +stolen laptop, ransomware or an as-of-yet undiscovered calamity. --- @@ -64,7 +67,7 @@ is protected and easily accessible. The Docker command provided in this quick start is given as an example and parameters should be adjusted to your need. -Launch the CrashPlan PRO docker container with the following command: +Launch the CrashPlan docker container with the following command: ```shell docker run -d \ --name=crashplan-pro \ @@ -79,7 +82,7 @@ Where: - `/docker/appdata/crashplan-pro`: This is where the application stores its configuration, states, log and any files needing persistency. - `/home/user`: This location contains files from your host that need to be accessible to the application. -Browse to `http://your-host-ip:5800` to access the CrashPlan PRO GUI. +Browse to `http://your-host-ip:5800` to access the CrashPlan GUI. Files from the host appear under the `/storage` folder in the container. ## Usage @@ -130,6 +133,7 @@ of this parameter has the format `=`. |`VNC_PASSWORD`| Password needed to connect to the application's GUI. See the [VNC Password](#vnc-password) section for more details. | (no value) | |`ENABLE_CJK_FONT`| When set to `1`, open-source computer font `WenQuanYi Zen Hei` is installed. This font contains a large range of Chinese/Japanese/Korean characters. | `0` | |`CRASHPLAN_SRV_MAX_MEM`| Maximum amount of memory the CrashPlan Engine is allowed to use. One of the following memory unit (case insensitive) should be added as a suffix to the size: `G`, `M` or `K`. By default, when this variable is not set, a maximum of 1024MB (`1024M`) of memory is allowed. **NOTE**: Setting this variable as the same effect as running the `java mx VALUE, restart` command from the CrashPlan command line. | `1024M` | +|`CRASHPLAN_SERVER_ADDRESS`| The CrashPlan server address to use. This is provided by CrashPlan when subscribing to a plan. **NOTE**: CrashPlan for Small Business version requires this variable to be set to `SMB`. This edition comes with a specific, pre-defined server address. | (no value) | #### Deployment Considerations @@ -306,7 +310,7 @@ container image. 4. Select the image, click *Download* and then choose the `latest` tag. 5. Wait for the download to complete. A notification will appear once done. 6. Click on *Container* in the left pane. - 7. Select your CrashPlan PRO container. + 7. Select your CrashPlan container. 8. Stop it by clicking *Action*->*Stop*. 9. Clear the container by clicking *Action*->*Reset* (or *Action*->*Clear* if you don't have the latest *Docker* application). This removes the diff --git a/appdefs.yml b/appdefs.yml index 7f69854..1693d6e 100644 --- a/appdefs.yml +++ b/appdefs.yml @@ -10,17 +10,18 @@ app: id: 10 name: crashplan-pro - friendly_name: CrashPlan PRO + friendly_name: CrashPlan gui_type: x11 base_os: alpine project: description: |- - CrashPlan offers the most comprehensive online backup solution to tens of - thousands of businesses around the world. The highly secure, automatic and - continuous service provides customers the peace of mind that their digital life - is protected and easily accessible. + CrashPlan provides peace of mind through secure, scalable, and + straightforward endpoint data backup. We help organizations recover from + any worst-case scenario, whether it is a disaster, simple human error, a + stolen laptop, ransomware or an as-of-yet undiscovered calamity. url: https://www.crashplan.com unraid: + name: CrashPlanPRO extra_description: >- **Warning**: Make sure to read the *Taking Over Existing Backup* section of the documentation if you are installing this container to replace another CrashPlan @@ -28,6 +29,9 @@ app: support_url: https://forums.unraid.net/topic/59647-support-crashplan-pro/ category: "Backup:" documentation: + overview: |- + This Docker container can be used with all CrashPlan products: Essential, + Professional, Enterprise, MSPs and Small Business (no longer sold). sections: - title: Taking Over Existing Backup level: 2 @@ -620,6 +624,25 @@ container: display: advanced required: false mask: false + - name: CRASHPLAN_SERVER_ADDRESS + description: >- + The CrashPlan server address to use. This is provided by CrashPlan when + subscribing to a plan. + **NOTE**: CrashPlan for Small Business version requires this variable + to be set to `SMB`. This edition comes with a specific, pre-defined + server address. + type: public + unraid_template: + title: CrashPlan Server Address + description: >- + The CrashPlan server address to use. This is provided by CrashPlan + when subscribing to a plan. + **NOTE**: CrashPlan for Small Business version requires this variable + to be set to "SMB". This edition comes with a specific, pre-defined + server address. + display: always + required: false + mask: false # Volumes volumes: [] diff --git a/rootfs/etc/cont-init.d/55-crashplan-pro.sh b/rootfs/etc/cont-init.d/55-crashplan-pro.sh index 4ade2f8..154f00f 100755 --- a/rootfs/etc/cont-init.d/55-crashplan-pro.sh +++ b/rootfs/etc/cont-init.d/55-crashplan-pro.sh @@ -3,12 +3,6 @@ set -e # Exit immediately if a command exits with a non-zero status. set -u # Treat unset variables as an error. -get_cp_max_mem() { - if [ -f "$1" ]; then - cat "$1" | sed -n 's/.*\(.*\)<\/javaMemoryHeapMax>.*/\1/p' - fi -} - # Generate machine id. # NOTE: CrashPlan requires the machine-id to be the same to avoid re-login. # Thus, it needs to be saved into the config directory. @@ -28,7 +22,7 @@ mkdir -p /config/var mkdir -p /config/repository/metadata mkdir -p /config/.crashplan -# Workaround for a crash that occurs with the enfine with version 11.0.1.33. +# Workaround for a crash that occurs with the engine with version 11.0.1.33. # See https://github.com/jlesage/docker-crashplan-pro/issues/416 mkdir -p /dev/input/by-path @@ -54,6 +48,25 @@ elif [ "$(cat /config/cp_version)" != "$(cat /defaults/cp_version)" ]; then UPGRADE=1 fi +# Determine if the "SMB" version (for Small Business) of the CrashPlan app is needed. +IS_SMB=0 +if [ -f /config/conf/default.service.xml ]; then + if grep -q 'BUSINESS' /config/conf/default.service.xml + then + # The existing installation is the SMB version. + IS_SMB=1 + fi +elif [ "${CRASHPLAN_SERVER_ADDRESS:-}" = "SMB" ]; then + # New installation for the SMB version. + IS_SMB=1 +fi + +if [ "$IS_SMB" -eq 1 ]; then + echo "running the CrashPlan for Small Business version" +elif [ -n "${CRASHPLAN_SERVER_ADDRESS:-}" ]; then + echo "using CrashPlan server $CRASHPLAN_SERVER_ADDRESS" +fi + # Install defaults. if [ "$FIRST_INSTALL" -eq 1 ] || [ "$UPGRADE" -eq 1 ]; then # Copy default config files. @@ -64,6 +77,15 @@ if [ "$FIRST_INSTALL" -eq 1 ] || [ "$UPGRADE" -eq 1 ]; then # Clear the cache. rm -rf /config/cache/* + + # Adjust the default.service.xml file. + if [ "$IS_SMB" -eq 1 ]; then + # The SMB version has a hard-coded server address. + sed-patch 's|ENTERPRISE|BUSINESS|' /config/conf/default.service.xml + sed-patch 's||' /config/conf/default.service.xml + elif [ -n "${CRASHPLAN_SERVER_ADDRESS:-}" ]; then + sed-patch 's||' /config/conf/default.service.xml + fi fi # run.conf was used before CrashPlan 7.0.0.