Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cef7a4ac7b | ||
|
|
bd95f57b6e |
No files matched your search
@@ -9,8 +9,8 @@ logic remains common and can be updated through Git.
|
||||
`backup.sh` runs these stages in order:
|
||||
|
||||
1. `stages/10-containers.sh` — stop, archive, pull, start and verify projects.
|
||||
2. `methods/20-rclone.sh` — copy archives to an rclone destination when enabled.
|
||||
3. `methods/30-smb.sh` — copy archives to a mounted SMB share when enabled.
|
||||
2. `stages/20-rclone.sh` — copy archives to an rclone destination when enabled.
|
||||
3. `stages/30-smb.sh` — copy archives to a mounted SMB share when enabled.
|
||||
4. `stages/90-prune.sh` — retain the newest configured number of `.zst`
|
||||
archives locally, including legacy `.zst` and current `.tar.zst` names.
|
||||
|
||||
@@ -38,7 +38,7 @@ cd /backupdockerscripts
|
||||
sudo cp .env.example .env
|
||||
sudo cp containers.txt containers.local.txt
|
||||
sudo chmod 600 .env
|
||||
sudo chmod +x backup.sh docker-backup.sh dockerbackup_prune.sh stages/*.sh methods/*.sh
|
||||
sudo chmod +x backup.sh stages/*.sh
|
||||
```
|
||||
|
||||
Edit `.env`. Beaver's Docker source is already represented by:
|
||||
@@ -127,8 +127,8 @@ Run individual parts:
|
||||
|
||||
```bash
|
||||
sudo stages/10-containers.sh --dry-run
|
||||
sudo methods/20-rclone.sh --dry-run --force
|
||||
sudo methods/30-smb.sh --dry-run --force
|
||||
sudo stages/20-rclone.sh --dry-run --force
|
||||
sudo stages/30-smb.sh --dry-run --force
|
||||
sudo stages/90-prune.sh --dry-run
|
||||
```
|
||||
|
||||
@@ -179,8 +179,8 @@ pipeline lock prevents concurrent runs.
|
||||
|
||||
## Adding another backup method
|
||||
|
||||
Add an executable script named `methods/NN-name.sh`, for example
|
||||
`methods/40-restic.sh`. It should load `lib/common.sh`, accept `--dry-run`, and
|
||||
Add an executable script named `stages/NN-name.sh`, for example
|
||||
`stages/40-restic.sh`. It should load `lib/common.sh`, accept `--dry-run`, and
|
||||
return a non-zero status on failure. Add its short name to `.env`:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -10,7 +10,7 @@ while [[ $# -gt 0 ]]; do
|
||||
--containers|-f) CONTAINERS_OVERRIDE="${2:?Missing containers file}"; shift ;;
|
||||
-h|--help)
|
||||
echo "Usage: ${0##*/} [--dry-run] [--containers FILE] [--skip-containers] [--skip-prune]"
|
||||
echo "Methods run in BACKUP_METHODS order. Add methods/NN-name.sh and list name in BACKUP_METHODS."
|
||||
echo "Transfer stages run in BACKUP_METHODS order. Add stages/NN-name.sh and list name in BACKUP_METHODS."
|
||||
exit 0 ;;
|
||||
*) die "Unknown option: $1" 2 ;;
|
||||
esac
|
||||
@@ -59,7 +59,7 @@ fi
|
||||
method_args=(); (( DRY_RUN )) && method_args+=(--dry-run)
|
||||
for method in $BACKUP_METHODS; do
|
||||
method_script=""
|
||||
while IFS= read -r candidate; do method_script="$candidate"; break; done < <(find "$SCRIPT_DIR/methods" -maxdepth 1 -type f -name "*-${method}.sh" -print | sort)
|
||||
while IFS= read -r candidate; do method_script="$candidate"; break; done < <(find "$SCRIPT_DIR/stages" -maxdepth 1 -type f -name "*-${method}.sh" -print | sort)
|
||||
[[ -n "$method_script" ]] || die "Configured backup method not found: $method"
|
||||
"$method_script" "${method_args[@]}"
|
||||
done
|
||||
|
||||
File renamed without changes.
File renamed without changes.
@@ -1,63 +0,0 @@
|
||||
[1mdiff --git a/containers.txt b/containers.txt[m
|
||||
[1mindex 2105b35..b29a1fd 100644[m
|
||||
[1m--- a/containers.txt[m
|
||||
[1m+++ b/containers.txt[m
|
||||
[36m@@ -1,57 +1,9 @@[m
|
||||
# Container names[m
|
||||
[m
|
||||
[31m-[m
|
||||
[31m-#bitnami[m
|
||||
[31m-#containers.panda.old[m
|
||||
[31m-#containers.panda.txt[m
|
||||
[31m-#dashbling[m
|
||||
[31m-#_disabled-chrome2mqtt[m
|
||||
[31m-#_disabled-chromecast-mqtt-connector[m
|
||||
[31m-#_disabled-huginn[m
|
||||
[31m-#_disabled-ipsec-vpn-server[m
|
||||
[31m-#_disabled-isd[m
|
||||
[31m-#_disabled-rtl-mqtt[m
|
||||
[31m-#_disabled-rtl-sdr[m
|
||||
[31m-#_disabled-speedy[m
|
||||
[31m-#_disabled-tasmoadmin[m
|
||||
[31m-#_disabled-tasmobackup[m
|
||||
[31m-zigbee2mqtt[m
|
||||
[31m-#_disabled-zigbee2mqttassistant[m
|
||||
[31m-#_disabled-zoneminder[m
|
||||
diun[m
|
||||
[31m-#docker-backup.sh[m
|
||||
[31m-#docker-compose.yml.sample[m
|
||||
[31m-docker-ntp[m
|
||||
[31m-#down-backup-up[m
|
||||
[31m-#evnex-mqtt[m
|
||||
[31m-gitea[m
|
||||
grafana[m
|
||||
[31m-#guacamole[m
|
||||
[31m-#homeassistant[m
|
||||
[31m-#influxdb[m
|
||||
[32m+[m[32mhomeassistant[m
|
||||
influxdb2[m
|
||||
[31m-mediawiki[m
|
||||
mosquitto[m
|
||||
[31m-mqcontrol-scripts[m
|
||||
[31m-#mqtt-chromecast[m
|
||||
[31m-#mqttview[m
|
||||
[31m-mqtt-watchdog[m
|
||||
[31m-nodered[m
|
||||
[31m-nsupdater[m
|
||||
[31m-ombi[m
|
||||
[31m-#openvpn-as[m
|
||||
pihole[m
|
||||
portainer[m
|
||||
[31m-rtl-433tomqtt[m
|
||||
[31m-rustdesk[m
|
||||
[31m-#smashing[m
|
||||
[31m-speedtest[m
|
||||
[31m-#tasmota-device-manager[m
|
||||
[31m-tautulli[m
|
||||
[31m-telegraf[m
|
||||
[31m-traefik[m
|
||||
[31m-ttyd[m
|
||||
[31m-#tvheadend[m
|
||||
[31m-#weewx[m
|
||||
[31m-whoami[m
|
||||
[31m-wireguard[m
|
||||
Reference in new issue
Block a user