unifios-utilities/rclone/10-rclone.sh
Christian Pearce 0f8ae40620
Initial commit for rclone (#216)
* Initial commit for rclone

* Update main README.md to include rclone as a project.

* Use cron on host controller

* Mount the /rclone directory to avoid a copy backup error.

* remove this port mapping

* Remove comment
2021-08-26 03:47:07 -07:00

21 lines
718 B
Bash

#!/bin/sh
CONTAINER=rclone
if podman container exists "$CONTAINER"; then
podman start "$CONTAINER"
else
podman run -i -d --rm \
--net=host \
-v /mnt/data/rclone:/data/backups/rclone \
-v /mnt/data/pihole:/data/backups/pihole \
-v /mnt/data/on_boot.d:/data/backups/on_boot.d \
-v /data/unifi/data/backup/autobackup:/data/backups//data/unifi/data/backup/autobackup \
-v /mnt/data/podman/cni:/data/backups/podman/cni \
-v /mnt/data/rclone:/config/rclone \
-v /mnt/data/rclone/sync.sh:/data/sync.sh \
--name "$CONTAINER" \
--security-opt=no-new-privileges \
rclone/rclone:latest \
rcd --rc-web-gui --rc-addr :5572 \
--rc-user rclone --rc-pass randompassword12345
fi