Here, we cover how to utilize the Backup Manager client on bare metal dedicated servers.
Related Articles
Managing Backups Using Backup Manager
Using Backup Manager in CWP
NOTE: Troubleshooting Bare Metal servers is outside of our scope of support. Please consult your Operating System support for any issues.
OS Requirements
- The following should be installed/configured prior to installing the Backup Manager client
- python3 (3.6+) interpreter
- if Python is compiled from source, it needs openssl support
- a crond that can read /etc/cron.d/
- openssl
- curl
- bash
- If MySQL is installed, /root/.my.cnf should be setup for the default config to work
- libc / glibc (not musl)
- init system: sysv, systemd, or upstart
- python3 (3.6+) interpreter
-
The Backup Manager client has been tested on the following operating systems
Distro Family Python3 Works Ubuntu 20.04 LTS Focal Debian 3.8 Yes Ubuntu 22.04 LTS Jammy Debian 3.10 Yes Debian 12 Bookworm Debian 3.11 Yes Debian 11 Bullseye Debian 3.9 Yes Debian 10 Buster Debian 3.7 Yes CentOS 6 RedHat 2.6 No (GCC and Python are too old) CentOS 7 RedHat 3.6 Yes AlmaLinux 8 RedHat 3.6 Yes AlmaLinux 9 RedHat 3.9 Yes OpenSUSE Leap 15.5 SUSE 3.6 Yes Alpine 3.18.6 <none> 3.11 No (Alpine uses musl)
Installation
- Install wget by running the applicable command as the root user
-
Debian and Ubuntu
apt-get -y install wget -
RedHat, Fedora, CentOS, and AlmaLinux
yum -y install wget
-
-
Run the following to install the Backup Manager client
sudo su - cd /root wget -O bakmgr-setup.sh https://repo-ded.inmotionhosting.com/pypi/bakmgr-setup.txt chmod +x bakmgr-setup.sh ./bakmgr-setup.sh --host $(hostname -s) # must match the amp machine name! rm -f bakmgr-setup.shIMPORTANT: If the server's hostname has been modified, the server ID (e.g. ded1234) will need to be specified after --host, instead of using
$(hostname -s).
Logs
- The Backup Manager client logs to /var/log/bakmgr.log
- If running a distro using SysV, the dashboard logs to /var/log/bakmgr-dash.log, otherwise the dashboard logs to syslog
Scripts
- The following scripts are provided
-
/usr/bin/bakmgr (symlink to /opt/bakmgr/bin/bakmgr): This is the CLI tool for bakmgr which provides a way to validate configuration changes and restore data. See -h on each subcommand
- /usr/bin/backup is also linked here
- /opt/bakmgr/bin/cron: This file is executed on cron to create backups
- /opt/bakmgr/bin/bakmgr-setup: This runs on both initial setup and after updates to perform steps that, if this was an RPM, would be done during %post
- /opt/bakmgr/bin/bakmgr-update: This runs on cron and provides automatic updates without needing to hook into a package manager
- /opt/bakmgr/bin/bakmgr-uninstall: This removes bakmgr ( but will leave /etc/bakmgr/.auth.json and /usr/bin/restic intact, just in case)
-
/usr/bin/bakmgr (symlink to /opt/bakmgr/bin/bakmgr): This is the CLI tool for bakmgr which provides a way to validate configuration changes and restore data. See -h on each subcommand
Config Files
- Configuration files can be found in the following locations
-
/etc/bakmgr/bakmgr.yaml: configuration for what gets included in backups
NOTE: While this file can be modified manually, you should use the dashboard UI when possible. -
/etc/bakmgr/.auth.json: When the client registeres with the backup authority server, its API login is saved here
NOTE: It should not be necessary to modify this file manually.
-
/etc/bakmgr/bakmgr.yaml: configuration for what gets included in backups
Dashboard UI
- The dashboard runs on TCP port 4001
EXAMPLE: https://ded1234.inmotionhosting.com:4001
NOTE: It may be necessary to manually open the port in the server firewall. -
The dashboard defaults to using a self-signed SSL certificate, but a real cert can be intalled using the following paths, if desired:
-
- SSL Certificate: /etc/bakmgr/dash.crt
- Private Key: /etc/bakmgr/dash.key
- (Optional) CA Bundle: /etc/bakmgr/dash.cabundle
NOTE: the "bakmgr" service will need to be restarted after replacing the files.
-
Restoring Data via CLI
-
The restore-files command can be used to restore files
bakmgr restore-files /file/pathREPLACE: /file/path with the path to the file or directory you wish to restore.
-
The restore-mysql command can be used to restore MySQL databases
bakmgr restore-mysql /file/path/name.sqlREPLACE: /file/path/name.sql with the desired name and file path to export the database to.
-
See each command's help page for more options
bakmgr restore-files -h bakmgr restore-mysql -h bakmgr restore-pgsql -hNOTE: If there are multiple backups of the type requested, you will be prompted to select which one to restore from.
TIP: The--latestoption can be used to automatically select the most recent backup instead of being prompted.
Comments
0 comments
Article is closed for comments.