Update btrfs-backup script
This commit is contained in:
parent
9d8e794c24
commit
33c3a5a1cd
1 changed files with 3 additions and 3 deletions
|
@ -29,7 +29,7 @@ fi
|
|||
|
||||
# Get latest snapshot number from snapper
|
||||
LATEST_SNAPSHOT=$(sudo snapper -c "$SNAPPER_CONFIG" list | tail -n 1 | awk '{print $1}')
|
||||
|
||||
HOSTNME=$(hostname)
|
||||
REMOTE_HOST="root@synology"
|
||||
BASE_DEST_PATH="/volume1/BTRFS_Receives/`hostname`/${SNAPPER_CONFIG}"
|
||||
DEST_PATH="/volume1/BTRFS_Receives/`hostname`/${SNAPPER_CONFIG}/${LATEST_SNAPSHOT}"
|
||||
|
@ -73,8 +73,8 @@ verify_remote() {
|
|||
|
||||
# Function to get remote snapshots
|
||||
get_remote_snapshots() {
|
||||
# ssh "$REMOTE_HOST" "find '$BASE_DEST_PATH' -maxdepth 2 -type d -name 'snapshot*' | sort -n"
|
||||
ssh "$REMOTE_HOST" "btrfs subvolume list /volume1/ -t | grep `hostname` | grep $SNAPPER_CONFIG"
|
||||
ssh "$REMOTE_HOST" "find '$BASE_DEST_PATH' -maxdepth 2 -type d -name 'snapshot*' | sort -n"
|
||||
# ssh "$REMOTE_HOST" "btrfs subvolume list /volume1/ -t | grep $HOSTNAME | grep $SNAPPER_CONFIG"
|
||||
}
|
||||
|
||||
# Function to cleanup old remote snapshots
|
||||
|
|
Loading…
Reference in a new issue