Backup : Update paths.
This commit is contained in:
parent
f62332b3f1
commit
0b722b116b
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Source modules.
|
||||
for file in /var/roothome/.config/bash/module/*.sh; do
|
||||
for file in /root/.config/bash/module/*.sh; do
|
||||
source "${file}"
|
||||
done
|
||||
|
||||
|
@ -11,11 +11,11 @@ function report() {
|
|||
}
|
||||
|
||||
# Define constants.
|
||||
path_src="/var/mnt/storage/hot" # Backup src location.
|
||||
path_mount="/var/mnt/storage/cold_1" # Backup mount location.
|
||||
path_backup="${path_mount}/backup" # Backup dir location.
|
||||
path_docker="${path_backup}/home" # Docker backup location.
|
||||
path_media="/var/mnt/storage/cold_1/media /var/mnt/storage/cold_2/media" # Media paths.
|
||||
path_src="/storage/hot"
|
||||
path_mount="/storage/cold_1"
|
||||
path_backup="${path_mount}/backup"
|
||||
path_docker="${path_backup}/home"
|
||||
path_media="/storage/cold_1/media /storage/cold_2/media"
|
||||
|
||||
# Check if backup drive is mounted.
|
||||
if [ ! -f "${path_mount}"/.mount ]; then
|
||||
|
@ -40,7 +40,7 @@ cd -
|
|||
|
||||
# Backup docker.
|
||||
docker=$(archive_fast docker/)
|
||||
bupsize=$(du ${docker} | awk '{print $1}')
|
||||
bupsize=$(du -h ${docker} | awk '{print $1}')
|
||||
mv ${docker} ${path_docker}/ || report "Backup : Failed to save docker!"
|
||||
|
||||
# Backup some media.
|
||||
|
|
Reference in a new issue