Kleines tutorial zur Zielordnerverschlüsselung
Ich wurde in den
Comments zu Ultimate Backup auf CPHub vom Benutzer Anguel gefragt, wie genau das mit der Zielordnerverschlüsselung funktioniert. Aus diesem Grunde habe ich mal ein kurzes Tutorial geschrieben, welche später auch in die Ultimate Backup einfließen wird. Ich schreib die Anleitung mal auf Englisch, aber ich denke, das sollte hier kein Problem darstellen.
Small tutorial for target folder encryption
Ultimate Backup destination folder encryption relies on the encryption system "
ecryptFS". The following instructions describe the way to decrypt an encrypted destination folder via the terminal. As an example, we create a new Ultimate Backup backup job with the following settings.
Backup name: /volumeUSB1/usbshare/rsync_backupset.sh
Backup folder: /volumeUSB1/usbshare/Backupfolder
Key file: /volumeUSB1/usbshare/backupsecret.key
Password: test
In order to be able to mount the encrypted folder, you need a passphrase, which we have created according to the following scheme
Determine the SERIAL-NUMBER-OF-THE-DS:
Code:
cat /proc/sys/kernel/syno_serial
[COLOR="#FF0000"]1234ABC567890[/COLOR]
Generate the PASSPHRASE:
UltimateBackup[SERIAL-NUMBER-OF-THE-DS]
Example: UltimateBackup1234ABC567890
Based on the PASSPHRASE, you can now extract the password of the key file
ecryptfs-unwrap-passphrase /BACKUPDIR/KEY-FILE-NAME.key PASSPHRASE
Example:
Code:
ecryptfs-unwrap-passphrase /volumeUSB1/usbshare/backupsecret.key UltimateBackup1234ABC567890
[COLOR="#FF0000"]test[/COLOR]
Now we can mount an encrypted folder in an decrypted folder. For this we first have to create an unencrypted folder.
For example
Code:
mkdir -p /volumeUSB1/usbshare/Backupfolder
Then we can mount the encrypted folder
For example: mount the decrypted folder @Backupfolder@ into the encrypted folder Backupfolder.
Note: Replaced "/volumeUSB1/usbshare/@Backupfolder@/" with the path to the encrypted folder and "/volumeUSB1/usbshare/Backupfolder/" with the path to the decrypted folder you used. Replaced passphrase_passwd "test" with your password.
Example:
Code:
yes "" | /bin/mount -t ecryptfs "/volumeUSB1/usbshare/@Backupfolder@/" "/volumeUSB1/usbshare/Backupfolder/" -o key=passphrase:passphrase_passwd="test",ecryptfs_cipher=aes,no_sig_cache,ecryptfs_key_bytes=32,ecryptfs_passthrough=n,ecryptfs_enable_filename_crypto
To unmont (decrypt) the folder try...
/bin/umount /PATH-TO/BACKUPDIR
Example:
Code:
/bin/umount /volumeUSB1/usbshare/Backupfolder
That's all!