I used to make encrypted backups of folders on my computer onto my external hard drive using the following command. I understand that it pipes gpg into tar, but I wouldn't be able to give a decent explanation of how it works.
I would then enter a password for gpg to use, and then let it run. This worked fine in 14.04, but I recently upgraded to 18.04 and the command does not work anymore. It now returns the following error message. Any help would be appreciated. Thanks!
Code:
tar zcf - /directory/to/backup | gpg -c > path/to/external_hard_drive/fileName.tar.gz.gpg
tar: Removing leading `/' from member names
gpg: problem with the agent: Inappropriate ioctl for device
gpg: error creating passphrase: Operation cancelled
gpg: symmetric encryption of '[stdin]' failed: Operation cancelled
tar: -: Wrote only 2048 of 10240 bytes
tar: Child returned status 141
tar: Error is not recoverable: exiting now
gpg: problem with the agent: Inappropriate ioctl for device
gpg: error creating passphrase: Operation cancelled
gpg: symmetric encryption of '[stdin]' failed: Operation cancelled
tar: -: Wrote only 2048 of 10240 bytes
tar: Child returned status 141
tar: Error is not recoverable: exiting now
Comment