Fixed command logic.

dev
Franco Masotti 3 years ago
parent 3abca50247
commit d2f1e55f80
  1. 11
      _posts/2019-02-23-my-backup-system.md

@ -1,7 +1,7 @@
---
title: My backup system
tags: [bash, shell, backup, rsync, LUKS, cryptsetup, sync, shred]
updated: 2019-06-20 19:17
updated: 2019-06-25 18:45
description: A detailed exaplanation of my backup system which is both encrypted and unencrypted for different purposes.
---
@ -282,11 +282,10 @@ fi
dev="/dev/"$(lsblk -x name -i -o name,uuid | grep "${UUID}" | awk '{print $1}')""
[ -z "${dev}" ] && exit 1
cryptsetup open "${dev}" "${NAME}"
mount /dev/mapper/"${NAME}" "${DST}"
./backup.sh "${SRC}" "${DST}"
umount "${DST}"
cryptsetup close "${NAME}"
cryptsetup open "${dev}" "${NAME}" && mount /dev/mapper/"${NAME}" "${DST}" \
&& ./backup.sh "${SRC}" "${DST}"
umount "${DST}" && cryptsetup close "${NAME}"
```
#### Configuration file

Loading…
Cancel
Save