Debian / Ubuntu
Install
- First, download the package using cURL or wget (or manually upload the file via SFTP or equivalent to the server).
- Run
sudo apt installwith the package name and version number (e.g.BinaryBackup-24.8.2.deb), this will install the package into/opt/BinaryBackup/. - It will now prompt you for your backup username and password. Please note, this may be different from your control panel credentials.
- The URL provided will point by default to our main server. Accept this and continue.
- The installer will finish registering your device to your account, and start up the service!
If you make a mistake with your credentials, run /opt/BinaryBackup/backup-tool login prompt to re-enter your credentials.
Uninstall
You can uninstall the package at any time by running apt remove backup-tool.
If you would also like to remove credentials, you can run apt purge backup-tool for a complete uninstall.
Synology
- Download the correct Synology SPK for your DSM (6 or 7).
- Enable installation of packages by any publisher in the Package Center, in
Settings > General > Trust Level. Accept the settings. - Now you can install the SPK. Open the Package Manager and click Manual Install on the top right.
- Upload the BinaryBackup
.spk- if on DSM 7, accept the prompt to allow for installation of third-party packages. - Accept the licence agreement.
- Enter your username and password. Please note, this may be different from your control panel credentials.
- Press Apply to complete the installation.
On DSM 7 only, you need to give the backuptool user additional permissions to acccess Shared Folders.
- Open the Control Panel and go to Shared Folders.
- Select the Shared Folder containing the data to be backed up, and click Edit.
- In the Permissions tab, select
System internal userfrom the dropdown menu on the left. - Click the checkbox for the user backuptool in the Custom column.
- Ensure all permissions are granted in the Permission Editor, and ensure Apply To is set to
All.
Note: Synology .spk's can not be updated automatically. You must install updates manually using the same process as above.
When restoring, ensure you follow all instructions again to ensure the user has proper access to the Shared Folders.
Generic Linux (RHEL, CentOS and other Linux distributions, including NAS's)
Install
Note: In order to avoid distribution-specific differences, the package does not automatically start on boot.
You should configure your system to run the launch script in /opt/ on boot (e.g. via a systemd unit, upstart script, /etc/init.d/ script, or a line in init.rc).
- First, download the package using cURL or wget (or manually upload the file via SFTP or equivalent to the server).
- Run the
.runfile with elevated permissions, with the package name and version number (e.g.BinaryBackup-24.8.2.run), this will install the package into/opt/BinaryBackup/. - It will now prompt you for your backup username and password. Please note, this may be different from your control panel credentials.
- The URL provided will point by default to our main server. Accept this and continue.
- The installer will finish registering your device to your account, and start up the service!
Uninstall
To uninstall you need to:
- Stop all BinaryBackup processes
- Remove the relevant subdirectory under
/opt/ - Remove any custom startup scripts
Restarting at boot
The installer creates a backup-daemon-start.sh script that can start the service. The BinaryBackup agent on generic Linux installs can be restarted by running the backup-daemon-start.sh script.
In order for BinaryBackup to start after a system reboot, you must configure this script to be run on system boot. Different Linux distributions support different methods for running commands on system boot: choose the most appropriate method for your Linux distribution. Some common choices are documented below.
Preserve HOME environment variable
BinaryBackup uses the $HOME environment variable to find its saved credentials. When configuring BinaryBackup to start at system boot, ensure that the $HOME environment variable is set (i.e. to /root/), to ensure that BinaryBackup can find its saved credentials. If BinaryBackup is unable to log in, it's possible that your Linux distribution does not set $HOME at this early-boot stage. In that case, you should try running HOME=/root/ /opt/BinaryBackup/backup-daemon-start.sh & instead. BinaryBackup will automatically try to use /root/ as the $HOME directory if $HOME is not already set or if it is set to a blank path.
Note: If you execute the .run installation script as root, this may have different results than if you execute the .run script using an elevated terminal session with 'sudo'. The 'sudo' command preserves the $HOME variable on Ubuntu; whilst on Debian the $HOME variable is erased, and sudo then sets it to the home directory of the originating user.
Start in the background
If you are running commands over SSH, please be aware that the backup-daemon-start.sh script runs in the foreground and will die when the SSH session is closed. You can avoid this by running the script in the background.
You can run the script in the background (daemonize) by using the backup-daemon-start-background.sh file instead.
Startup via rc.local
You can make BinaryBackup start at system boot by adding an entry to the rc.local file.
First, find the rc.local file on your system:
/etc/rc.local(Debian/Ubuntu)/etc/rc.d/rc.local(CentOS/RHEL)
Add the following content to the rc.local file:
/opt/BinaryBackup/backup-daemon-start.sh &
If the rc.local file contains an exit 0 statement, the additional command should be added before such a statement.
As of CentOS 7, the rc.local file is not executable by default. You should run chmod +x on the rc.local file to enable using this method for startup scripts.
Startup via rc.d
You can make BinaryBackup start at system boot by adding a file to the rc.d directory.
First, find the rc.d directory on your system:
/usr/local/etc/rc.d(Synology DSM 6.1+)
Add a new file to the rc.d directory with the following contents:
#!/bin/bash
/opt/BinaryBackup/backup-daemon-start-background.sh
Mark the file as executable: chmod +x /usr/local/etc/rc.d/binarybackup-startup-script.sh
Startup via cron
You can make BinaryBackup start at system boot by adding an entry to root's crontab.
- Run
crontab -e -u rootto launch a crontab editor - Add the line
@reboot /opt/BinaryBackup/backup-daemon-start-background.sh
Startup via init.d
(todo)
Startup via systemd
You can use the following unit as an basic example:
[Unit]
Description=BinaryBackup Client
After=network-online.target
[Service]
Type=simple
RemainAfterExit=true
KillMode=process
User=root
ExecStart=/opt/BinaryBackup/backup-daemon-start.sh
[Install]
WantedBy=multi-user.target
This unit file correctly starts the BinaryBackup service at system boot.
However, the process management in systemd is not fully compatible with the way BinaryBackup's multi-process model works. In particular, there are compatibility issues with the software updater. As a result, the above unit is (A) unable to take advantage of process group cleanup; (B) unable to auto-restart the BinaryBackup agent service; and (C) after a software upgrade, BinaryBackup will keep running but the unit will remain in "exited" state.
Autostart for graphical desktop application
In the "Other Distribution" package, the graphical application is not automatically configured to start when the desktop logs in. You may add backup-interface --background as an autostart command to your desktop environment's settings.