don't use fedora as user for paths
This commit is contained in:
@@ -83,7 +83,7 @@ specifics for everything
|
|||||||
- to back up automatically, run `sudo EDITOR=micro crontab -e` and add the following:
|
- to back up automatically, run `sudo EDITOR=micro crontab -e` and add the following:
|
||||||
```
|
```
|
||||||
TZ=UTC
|
TZ=UTC
|
||||||
0 * * * * /home/fedora/thingy/scripts/volume-backup.sh
|
0 * * * * /home/admin/thingy/scripts/volume-backup.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
## todo
|
## todo
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
THINGY_DIR="/home/fedora/thingy" # todo: better
|
WORKING_DIR="/home/admin/thingy" # todo: better
|
||||||
LOG_FILE="/var/log/volume-backup.log"
|
LOG_FILE="/var/log/volume-backup.log"
|
||||||
|
|
||||||
function log() {
|
function log() {
|
||||||
@@ -17,7 +17,7 @@ trap cleanup EXIT
|
|||||||
|
|
||||||
log "┌────── backup started ─────┐"
|
log "┌────── backup started ─────┐"
|
||||||
|
|
||||||
cd "$THINGY_DIR"
|
cd "$WORKING_DIR"
|
||||||
|
|
||||||
log "stopping docker services"
|
log "stopping docker services"
|
||||||
docker compose stop
|
docker compose stop
|
||||||
|
|||||||
Reference in New Issue
Block a user