FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 2dd5cd07 authored by Dr Adam Thorn's avatar Dr Adam Thorn
Browse files

Cease attempt to unexport ZFS when moving backup to a different zpool

1. The export is done via set sharenfs which means we shouldn't need
   to manually manage exports

2. This part of the script does not work because it tries to unexport
   the old export but by looking up the db record that we have already
   updated to refer to the new zpool.
parent 94dc75f2
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@ Priority: optional
Section: otherosfs
Maintainer: Chemistry COs <support@ch.cam.ac.uk>
Architecture: all
Version: 0.9-ch108
Version: 0.9-ch109
Depends: zfs-dkms, postgresql-13 | postgresql-9.5 | postgresql-9.4 , liblockfile-simple-perl, libdbi-perl, libjson-perl, libzfs-perl-chem, libnet-openssh-perl, libdbd-pg-perl, mbuffer, rsync, nfs-kernel-server, pv, libwww-curl-perl, libformat-human-bytes-perl
Recommends: backup-scheduler-rsync
Description: a backup system using ZFS (repository 'backup-scheduler')
......@@ -71,12 +71,5 @@ echo Re-enabling backup task
dosql "update host set disabled='f' where hostname='$FQDN';"
# Tidy up
echo Removing old ZFS, snapshots etc
# need to try to unexport nfs here, but failure isn't a worry
set +e
EXPORTS=`dosql "select zfs_target from backup_task where backup_task_id in (select backup_task_id from backup_task natural join host where hostname='$FQDN')"`
for EXPORT in $EXPORTS ; do
exportfs -u $FQDN:/$EXPORT
done
set -e
for SN in `zfs list -r -t snapshot -H -o name $SOURCE/$FQDN ` ; do for H in `zfs holds -H $SN | awk ' { print $2 ; } '` ; do zfs release $H $SN ; done ; done
zfs destroy -r $SOURCE/$FQDN
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment