-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecover-macos.sh
More file actions
31 lines (24 loc) · 757 Bytes
/
recover-macos.sh
File metadata and controls
31 lines (24 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# Recover files from encrypted remote backup -- Mac version
# by Wolfram Rösler 2018-07-27
# Mount point for encrypted remote files (WebDAV mount)
ENC=/Volumes/u123456.your-storagebox.de
if [ ! -d $ENC ];then
echo "In Finder, press ⌘ K and mount $ENC."
exit 1
fi
# Encryption key file
export ENCFS6_CONFIG=/path/to/.encfs6.xml
# Mount point for decrypted backup
DEC=/Volumes/nextcloud-decrypted
# Umount first just to be sure
umount $DEC &>/dev/null
# Decrypt
mkdir -p $DEC || exit
encfs --public --stdinpass $ENC/nextcloud/nextcloud-encrypted $DEC <<<'your encfs password' || exit
# Open the decrypted files in Finder
open $DEC
read -p "Press Enter to unmount the recovery files:"
# Unmount everything
umount $DEC
umount $ENC