-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More work needed, replication on ovh cluster is coming in the way on sanoid/syncoid
- Loading branch information
Showing
4 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
# saving ovh3 volumes | ||
# they all are at the root, so we have no choice but listing them all | ||
# we also use a sync-snap because otherwise as we have few snapshots on ovh3 it would be complicated | ||
--no-privilege-elevation [email protected]:rpool/subvol-100-disk-0 hdd-zfs/off-backups/ovh3-rpool/subvol-100-disk-0 | ||
--no-privilege-elevation [email protected]:rpool/subvol-101-disk-0 hdd-zfs/off-backups/ovh3-rpool/subvol-101-disk-0 | ||
--no-privilege-elevation [email protected]:rpool/subvol-102-disk-0 hdd-zfs/off-backups/ovh3-rpool/subvol-102-disk-0 | ||
--no-privilege-elevation [email protected]:rpool/subvol-103-disk-0 hdd-zfs/off-backups/ovh3-rpool/subvol-103-disk-0 | ||
--no-privilege-elevation [email protected]:rpool/subvol-104-disk-0 hdd-zfs/off-backups/ovh3-rpool/subvol-104-disk-0 | ||
--no-privilege-elevation [email protected]:rpool/subvol-105-disk-0 hdd-zfs/off-backups/ovh3-rpool/subvol-105-disk-0 | ||
--no-privilege-elevation [email protected]:rpool/subvol-106-disk-0 hdd-zfs/off-backups/ovh3-rpool/subvol-106-disk-0 | ||
--no-privilege-elevation [email protected]:rpool/subvol-107-disk-0 hdd-zfs/off-backups/ovh3-rpool/subvol-107-disk-0 | ||
--no-privilege-elevation [email protected]:rpool/subvol-108-disk-0 hdd-zfs/off-backups/ovh3-rpool/subvol-108-disk-0 | ||
--no-privilege-elevation [email protected]:rpool/subvol-110-disk-0 hdd-zfs/off-backups/ovh3-rpool/subvol-110-disk-0 | ||
--no-privilege-elevation [email protected]:rpool/subvol-113-disk-0 hdd-zfs/off-backups/ovh3-rpool/subvol-113-disk-0 | ||
--no-privilege-elevation [email protected]:rpool/subvol-115-disk-0 hdd-zfs/off-backups/ovh3-rpool/subvol-115-disk-0 | ||
--no-privilege-elevation [email protected]:rpool/subvol-130-disk-0 hdd-zfs/off-backups/ovh3-rpool/subvol-130-disk-0 | ||
--no-privilege-elevation [email protected]:rpool/subvol-140-disk-0 hdd-zfs/off-backups/ovh3-rpool/subvol-140-disk-0 | ||
--no-privilege-elevation [email protected]:rpool/subvol-141-disk-0 hdd-zfs/off-backups/ovh3-rpool/subvol-141-disk-0 | ||
--no-privilege-elevation [email protected]:rpool/subvol-142-disk-0 hdd-zfs/off-backups/ovh3-rpool/subvol-142-disk-0 | ||
--no-privilege-elevation [email protected]:rpool/subvol-150-disk-0 hdd-zfs/off-backups/ovh3-rpool/subvol-150-disk-0 | ||
--no-privilege-elevation [email protected]:rpool/subvol-150-disk-1 hdd-zfs/off-backups/ovh3-rpool/subvol-150-disk-1 | ||
--no-privilege-elevation [email protected]:rpool/vm-200-disk-0 hdd-zfs/off-backups/ovh3-rpool/vm-200-disk-0 | ||
--no-privilege-elevation [email protected]:rpool/vm-200-disk-2 hdd-zfs/off-backups/ovh3-rpool/vm-200-disk-2 | ||
--no-privilege-elevation [email protected]:rpool/vm-201-disk-0 hdd-zfs/off-backups/ovh3-rpool/vm-201-disk-0 | ||
--no-privilege-elevation [email protected]:rpool/vm-201-disk-1 hdd-zfs/off-backups/ovh3-rpool/vm-201-disk-1 | ||
--no-privilege-elevation [email protected]:rpool/vm-202-disk-0 hdd-zfs/off-backups/ovh3-rpool/vm-202-disk-0 | ||
--no-privilege-elevation [email protected]:rpool/vm-203-disk-0 hdd-zfs/off-backups/ovh3-rpool/vm-203-disk-0 | ||
|
||
# pulling ovh3 backups - not recursive because there is non useful stuff inside | ||
# we need a sync snap, as for the moment we don't use it sanoid there | ||
--no-privilege-elevation [email protected]:rpool/backups hdd-zfs/off-backups/ovh3-rpool/backups |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../common/systemd/system/syncoid.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
# SANOID_TARGETS is an env variable set by sanoid before calling this script | ||
|
||
# This script removes eventual replication snapshot that have been synced | ||
# but shan't have been | ||
# | ||
# Use this only if the server is not a replication target ! | ||
readarray -d "," DATASETS <<< $SANOID_TARGETS | ||
for DATASET in "${DATASETS[@]}" | ||
do | ||
# remove line returns | ||
DATASET=$(echo $DATASET|tr -d '\r\n') | ||
if [[ -n "$DATASET" ]] && ( zfs list -t snap $DATASET | grep "__replicate_" ) | ||
then | ||
for REPLICATION_SNAPSHOT in $( zfs list -t snap $DATASET -o name | grep "@__replicate_" ) | ||
do | ||
zfs destroy $REPLICATION_SNAPSHOT | ||
done | ||
fi | ||
done |