mirror of
https://github.com/unifi-utilities/unifios-utilities.git
synced 2024-08-30 18:32:21 +00:00
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
This commit is contained in:
parent
c5f91c0ab9
commit
0f8ae40620
@ -97,6 +97,12 @@ A shell script with the goal to make the UDM-Pro silenced while still having goo
|
||||
|
||||
A split tunnel VPN script for the UDM with policy based routing. This helper script can be used on your UDM to route select VLANs, clients, or even domains through a VPN connection. It supports OpenVPN, WireGuard, and OpenConnect (Cisco AnyConnect) clients running directly on your UDM, and external VPN clients running on other servers on your network.
|
||||
|
||||
### rclone
|
||||
|
||||
<https://rclone.org/>
|
||||
|
||||
Run rclone container with Web GUI for offsite backups.
|
||||
|
||||
## Unsupported / No longer maintained
|
||||
### nextdns
|
||||
Run NextDNS on your UDM with podman.
|
||||
|
21
rclone/10-rclone.sh
Normal file
21
rclone/10-rclone.sh
Normal file
@ -0,0 +1,21 @@
|
||||
#!/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
|
33
rclone/README.md
Normal file
33
rclone/README.md
Normal file
@ -0,0 +1,33 @@
|
||||
# Rclone
|
||||
|
||||
## Features
|
||||
|
||||
- Rclone w/ WebGUI
|
||||
|
||||
## Requirements
|
||||
|
||||
1. You have successfully setup the on boot script described [here](https://github.com/boostchicken/udm-utilities/tree/master/on-boot-script)
|
||||
|
||||
## Steps
|
||||
|
||||
1. Make a directory for your configuration
|
||||
|
||||
```sh
|
||||
mkdir -p /mnt/data/rclone
|
||||
```
|
||||
|
||||
2. Create [rclone.conf](https://rclone.org/commands/rclone_config/) in `/mnt/data/rclone` and update it to meet yours needs.
|
||||
3. Copy [sync.sh](sync.sh) in `/mnt/data/rclone` and update it to meet your needs.
|
||||
4. Copy [10-rclone.sh](10-rclone.sh) to `/mnt/data/on_boot.d` and update it to meet your needs.
|
||||
5. Execute `/mnt/data/on_boot.d/10-rclone.sh`
|
||||
6. Execute `podman logs rclone`, this will provide a link to the Web GUI.
|
||||
7. Copy [rclone](rclone) in `/etc/cron.hourly/`.
|
||||
8. Set permissions to executable `chmod +x /etc/cron.hourly/rclone`.
|
||||
|
||||
## Customization
|
||||
|
||||
1. Login to run rclone commands locally to create and test configs
|
||||
|
||||
```sh
|
||||
podman exec -ti rclone /bin/sh
|
||||
```
|
3
rclone/rclone
Normal file
3
rclone/rclone
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
podman exec -ti rclone sh -x /data/sync.sh
|
2
rclone/sync.sh
Normal file
2
rclone/sync.sh
Normal file
@ -0,0 +1,2 @@
|
||||
# sync job for cron
|
||||
rclone sync Unifi:/data/backups google:backups
|
Loading…
Reference in New Issue
Block a user