diff --git a/clean-folders.sh b/clean-folders.sh new file mode 100755 index 0000000..7c30abe --- /dev/null +++ b/clean-folders.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -x +read -r -p "Are you sure? [y/N] " response +case "$response" in + [yY][eE][sS]|[yY]|[oO]) + rm -rf backups/* + rm -rf database/* + rm -rf wwwfolder/* + ;; + *) + return + ;; +esac + diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..808a783 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,28 @@ +version: '2' + +services: + urbackup: + image: docker.io/uroni/urbackup-server:latest + container_name: urbackup-server + restart: unless-stopped + environment: + - PUID=1001 # Enter the UID of the user who should own the files here + - PGID=1001 # Enter the GID of the user who should own the files here + - TZ=America/Toronto + volumes: + - ./database:/var/urbackup + - ./backups:/backups + # Uncomment the next line if you want to bind-mount the www-folder + - ./wwwfolder:/usr/share/urbackup + ports: + - 55413:55413/tcp + - 55414:55414/tcp + - 55415:55415/tcp + + #network_mode: "host" + # Uncomment the following two lines if you're using BTRFS support + #cap_add: + # - SYS_ADMIN + # Uncomment the following two lines if you're using ZFS support + #devices: + # - /dev/zfs:/dev/zfs diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..667b5b0 --- /dev/null +++ b/setup.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +useradd -s /sbin/nologin --no-create-home urbackup +mkdir backups +mkdir database +mkdir wwwfolder +grep urbackup /etc/passwd /etc/group + +#echo "Please CHOWN folders to URBACKUP user" +chown urbackup.urbackup wwwfolder/ database/ backups/ +