Before You Start
Encrypted folders can be backed up to an encrypted folder or they can be backed up to an unencrypted folder. Given that encrypted data that is backed up remains in encrypted form, you must backup an entire encrypted folder and the character limit is significantly more likely to be hit when backing up an encrypted folder to an encrypted folder, my recommendation would be to backup to an unencrypted folder.
Note: The backup folder should at least be on a different set of disks, but ideally a separate Synology/backup device.
How To Backup
The steps to configure backup are:
- Create a shared folder — I recommend leaving this shared folder unencrypted.
- Main Menu > Backup & Replication > Create > Data backup task.
- Select either Local Backup Destination or Remote Backup Destination — for security reasons the Public Cloud Backup Destination should not be selected.
- Select Back up data to local shared folder and enter the shared folder information you created during step 1.
- Select the secure folder to back up — my preference is one secure folder per backup destination, but this is not a hard requirement.
- Select applications to back up — this should be none.
- Enter backup settings — keeping the defaults and entering a backup schedule is sufficient.
If you want, you can run the job now or wait for the schedule to run if configured.
Why Test Backup
I strongly recommend running a backup upon first creating it just to ensure it is working properly. When I first attempted to backup my encrypted folder I did it to another encrypted folder. Upon running the backup job it failed less than a minute in with an unhelpful error message. I looked all over for more detailed information including within Log Center, but I could not determine what was causing the failure. Finally, I decided to SSH into the Synology and tail /var/log/messages. To my surprise, I saw the following:
/var/log/messages:Oct 6 20:41:57 nas01 synolocalbkp: localbkp_copy_file.cpp:111 errno=[36/File name too long] Failed to open file [/volume1/testbak/nas01_1/@[email protected]/ECRYPTFS_FNEK_ENCRYPTED.FWZgXd3362dtBEbTzc5Upo7m7QuqkpiuIp4iOTIjlDG0tgcFDTJoObbcC---/ECRYPTFS_FNEK_ENCRYPTED.FWZgXd3362dtBEbTzc5Upo7m7QuqkpiuIp4iPukKQv2aqmvTjrsJTAUJuU--/ECRYPTFS_FNEK_ENCRYPTED.FWZgXd3362dtBEbTzc5Upo7m7QuqkpiuIp4inHtnQUnAkJH88v2a2nbRVE--/ECRYPTFS_FNEK_ENCRYPTED.FZZgXd3362dtBEbTzc5Upo7m7QuqkpiuIp4igVdIypmXdVMnilVdApyHuuyqSB9W1RH8sG7MiybTU7k8xmAkRyALaeOU5bb.diLs4-16q8R81IMH-2uvbEmUQU--]
In my case the double encryption results in me hitting the character limit. My directory structure was not deep and my file names were quite short so I suspect this to be a common problem. The resolution was to backup to an unencrypted folder.
The backup process for Synology is similar to the backup process for other systems. The most important thing to keep in mind when backing up an encrypted folder is that backing up to an encrypted folder is not really necessary and will likely result in issues. Always be sure to test you backups to ensure they are working properly.
© 2015, Steve Flanders. All rights reserved.