mirror of
https://github.com/bashclub/bashclub-zfs-push-pull.git
synced 2024-12-24 13:40:13 +01:00
Delete backup-boot
This commit is contained in:
parent
64d10ff74d
commit
886ce7e6d1
18
backup-boot
18
backup-boot
@ -1,18 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Main system backups are carried out via ZFS send/receive,
|
|
||||||
# but that won't pick up /boot.
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# ensure /boot is the real deal
|
|
||||||
mountpoint -q /boot || (echo "/boot is not a mountpoint" >&2; exit 1)
|
|
||||||
|
|
||||||
# bind mount / to a temporary path
|
|
||||||
fakeroot=$(mktemp -d)
|
|
||||||
mount --bind / $fakeroot
|
|
||||||
|
|
||||||
# copy the /boot filesystem into /'s boot/
|
|
||||||
rsync -a --delete /boot/ $fakeroot/boot/
|
|
||||||
|
|
||||||
# clean up
|
|
||||||
umount $fakeroot
|
|
||||||
rmdir $fakeroot
|
|
Loading…
Reference in New Issue
Block a user