https://github.com/tiredofit/docker-backuppc
Docker web based enterprise backup software
https://github.com/tiredofit/docker-backuppc
backuppc docker zabbix-agent
Last synced: 12 months ago
JSON representation
Docker web based enterprise backup software
- Host: GitHub
- URL: https://github.com/tiredofit/docker-backuppc
- Owner: tiredofit
- License: mit
- Created: 2017-08-23T03:20:02.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2024-05-24T17:07:38.000Z (about 2 years ago)
- Last Synced: 2025-04-05T09:34:51.098Z (about 1 year ago)
- Topics: backuppc, docker, zabbix-agent
- Language: Perl
- Homepage:
- Size: 117 KB
- Stars: 29
- Watchers: 5
- Forks: 4
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# github.com/tiredofit/docker-backuppc
[](https://github.com/tiredofit/docker-backuppc/releases/latest)
[](https://github.com/tiredofit/docker-backuppc/actions)
[](https://hub.docker.com/r/tiredofit/backuppc/)
[](https://hub.docker.com/r/tiredofit/backuppc/)
[](https://github.com/sponsors/tiredofit)
[](https://www.paypal.me/tiredofit)
* * *
## About
This will build a Docker image for [BackupPC](https://backuppc.github.io/backuppc/) - A highly performant backup system.
## Maintainer
- [Dave Conroy](https://github.com/tiredofit)
# Table of Contents
- [Configuration](#configuration)
- [Data-Volumes](#data-volumes)
- [Environment Variables](#environment-variables)
- [Networking](#networking)
- [Maintenance](#maintenance)
- [Shell Access](#shell-access)
## Prerequisites and Assumptions
- Assumes you are using some sort of SSL terminating reverse proxy such as:
- [Traefik](https://github.com/tiredofit/docker-traefik)
- [Nginx](https://github.com/jc21/nginx-proxy-manager)
- [Caddy](https://github.com/caddyserver/caddy)
- Make sure there is adequate storage available to perform deduplicated backups!
## Installation
### Build from Source
Clone this repository and build the image with `docker build -t (imagename) .`
### Prebuilt Images
Builds of the image are available on [Docker Hub](https://hub.docker.com/r/tiredofit/backuppc)
```bash
docker pull docker.io/tiredofit/backuppc:(imagetag)
```
Builds of the image are also available on the [Github Container Registry](https://github.com/tiredofit/docker-backuppc/pkgs/container/docker-backuppc)
```
docker pull ghcr.io/tiredofit/docker-backuppc:(imagetag)
```
The following image tags are available along with their tagged release based on what's written in the [Changelog](CHANGELOG.md):
| Container OS | Tag |
| ------------ | --------- |
| Alpine | `:latest` |
## Configuration
### Quick Start
- The quickest way to get started is using [docker-compose](https://docs.docker.com/compose/). See the examples folder for a working [docker-compose.yml](examples/docker-compose.yml) that can be modified for development or production use.
- Set various [environment variables](#environment-variables) to understand the capabilities of this image.
- Map [persistent storage](#data-volumes) for access to configuration and data files for backup.
- Enter inside the container and as user `backuppc` `ssh-copy-id` your public keys to a remote host
- Visit your Web interface
### Persistent Storage
The following directories are used for configuration and can be mapped for persistent storage.
| Directory | Description |
| ------------------- | -------------------------------------- |
| `/etc/backuppc` | Configuration Files |
| `/home/backuppc` | Home Directory for Backuppc (SSH Keys) |
| `/var/lib/backuppc` | The backed up Data |
| `/www/logs` | Logfiles for Nginx, BackupPC |
### Environment Variables
#### Base Images used
This image relies on an [Alpine Linux](https://hub.docker.com/r/tiredofit/alpine) or [Debian Linux](https://hub.docker.com/r/tiredofit/debian) base image that relies on an [init system](https://github.com/just-containers/s6-overlay) for added capabilities. Outgoing SMTP capabilities are handlded via `msmtp`. Individual container performance monitoring is performed by [zabbix-agent](https://zabbix.org). Additional tools include: `bash`,`curl`,`less`,`logrotate`, `nano`.
Be sure to view the following repositories to understand all the customizable options:
| Image | Description |
| ------------------------------------------------------ | -------------------------------------- |
| [OS Base](https://github.com/tiredofit/docker-alpine/) | Customized Image based on Alpine Linux |
| [Nginx](https://github.com/tiredofit/docker-nginx/) | Nginx webserver |
#### Container Options
| Variable | Description | Default |
| ---------------- | ----------------------------- | ---------------------- |
| `USER_BACKUPPC` | The uid for the backuppc user | `1000` |
| `GROUP_BACKUPPC` | The gid for the backuppc user | `1000` |
| `CONFIG_PATH` | BackupPC Configuration Files | `/etc/backuppc` |
| `DATA_PATH` | BackupPC data backups | `/var/lib/backuppc` |
| `LOG_PATH` | Logfiles for BackupPC | `/www/logs/backuppc` |
| `SSH_KEYS_PATH` | SSH Keys Path | `/home/.backuppc/.ssh` |
#### Authentication
By default, this image does not use authentication. This is definitely not recommended on a production environment! Based on the environment variables from the [Nginx Base Image](https://github.com/tiredofit/docker-nginx/) you can set them here:
It's highly recommend you set at minimum:
```bash
NGINX_AUTHENTICATION_TYPE=BASIC
NGINX_AUTHENTICATION_BASIC_USER1=backuppc
NGINX_AUTHENTICATION_BASIC_PASS1=backuppc
```
| Parameter | Description | Default |
| ------------------------------------------- | ------------------------------------------------------------------------------ | -------------- |
| `NGINX_AUTHENTICATION_TYPE` | Protect the site with `BASIC`, `LDAP`, `LLNG` | `NONE` |
| `NGINX_AUTHENTICATION_TITLE` | Challenge response when visiting protected site | `Please login` |
| `NGINX_AUTHENTICATION_BASIC_USER1` | If `BASIC` chosen enter this for the username to protect site | `admin` |
| `NGINX_AUTHENTICATION_BASIC_PASS1` | If `BASIC` chosen enter this for the password to protect site | `password` |
| `NGINX_AUTHENTICATION_BASIC_USER2` | As above, increment for more users | |
| `NGINX_AUTHENTICATION_BASIC_PASS2` | As above, increment for more users | |
| `NGINX_AUTHENTICATION_LDAP_HOST` | Hostname and port number of LDAP Server - ie `ldap://ldapserver:389` | |
| `NGINX_AUTHENTICATION_LDAP_BIND_DN` | User to Bind to LDAP - ie `cn=admin,dc=orgname,dc=org` | |
| `NGINX_AUTHENTICATION_LDAP_BIND_PW` | Password for Above Bind User - ie `password` | |
| `NGINX_AUTHENTICATION_LDAP_BASE_DN` | Base Distringuished Name - eg `dc=hostname,dc=com` | |
| `NGINX_AUTHENTICATION_LDAP_ATTRIBUTE` | Unique Identifier Attrbiute -ie `uid` | |
| `NGINX_AUTHENTICATION_LDAP_SCOPE` | LDAP Scope for searching - ie `sub` | |
| `NGINX_AUTHENTICATION_LDAP_FILTER` | Define what object that is searched for (ie `objectClass=person`) | |
| `NGINX_AUTHENTICATION_LDAP_GROUP_ATTRIBUTE` | If searching inside of a group what is the Group Attribute - ie `uniquemember` | |
| `NGINX_AUTHENTICATION_LLNG_HANDLER_HOST` | If `LLNG` chosen use hostname of handler | `llng-handler` |
| `NGINX_AUTHENTICATION_LLNG_HANDLER_PORT` | If `LLNG` chosen use this port for handler | `2884` |
| `NGINX_AUTHENTICATION_LLNG_ATTRIBUTE1` | Syntax: HEADER_NAME, Variable, Upstream Variable - See note below | |
| `NGINX_AUTHENTICATION_LLNG_ATTRIBUTE2` | Syntax: HEADER_NAME, Variable, Upstream Variable - See note below | |
When working with `NGINX_AUTHENTICATION_LLNG_ATTRIBUTE2` you will need to omit any `$` chracters from your string. It will be added in upon container startup. Example:
`NGINX_AUTHENTICATION_LLNG_ATTRIBUTE1=HTTP_AUTH_USER,uid,upstream_http_uid` will get converted into `HTTP_AUTH_USER,$uid,$upstream_http_uid` and get placed in the appropriate areas in the configuration.
* * *
#### SMTP Options
See the [MSMTP Configuration Options](https://marlam.de/msmtp/msmtp.html) for further information on options to configure MSMTP.
| Parameter | Description | Default |
| --------------------- | ------------------------------------------------- | --------------- |
| `SMTP_AUTO_FROM` | Add setting to support sending through Gmail SMTP | `FALSE` |
| `SMTP_HOST` | Hostname of SMTP Server | `postfix-relay` |
| `SMTP_PORT` | Port of SMTP Server | `25` |
| `SMTP_DOMAIN` | HELO Domain | `docker` |
| `SMTP_MAILDOMAIN` | Mail Domain From | `local` |
| `SMTP_AUTHENTICATION` | SMTP Authentication | `none` |
| `SMTP_USER` | SMTP Username | `` |
| `SMTP_PASS` | SMTP Password | `` |
| `SMTP_TLS` | Use TLS | `FALSE` |
| `SMTP_STARTTLS` | Start TLS from within session | `FALSE` |
| `SMTP_TLSCERTCHECK` | Check remote certificate | `FALSE` |
### Networking
The following ports are exposed and available to public interfaces
| Port | Description |
| ---- | ----------- |
| `80` | HTTP |
**NOTE**: It is highly recommended this be run through a SSL proxy, or via localhost and tunnel via SSH.
## Maintenance
### Shell Access
For debugging and maintenance purposes you may want access the containers shell.
````bash
docker exec -it (whatever your container name is) bash
````
## Support
These images were built to serve a specific need in a production environment and gradually have had more functionality added based on requests from the community.
### Usage
- The [Discussions board](../../discussions) is a great place for working with the community on tips and tricks of using this image.
- [Sponsor me](https://tiredofit.ca/sponsor) for personalized support
### Bugfixes
- Please, submit a [Bug Report](issues/new) if something isn't working as expected. I'll do my best to issue a fix in short order.
### Feature Requests
- Feel free to submit a feature request, however there is no guarantee that it will be added, or at what timeline.
- [Sponsor me](https://tiredofit.ca/sponsor) regarding development of features.
### Updates
- Best effort to track upstream changes, More priority if I am actively using the image in a production environment.
- [Sponsor me](https://tiredofit.ca/sponsor) for up to date releases.
## License
MIT. See [LICENSE](LICENSE) for more details.
# References
- http://backuppc.sourceforge.net/
- https://backuppc.github.io/backuppc/