Ask Your Question

Update only new files in gpg-encrypted archive

asked 2013-10-06 08:27:45 -0500

cconrad gravatar image

updated 2013-10-09 08:12:26 -0500

none gravatar image

I am currently using the following command to make encrypted backups of folders:

tar -cv --acls --selinux /path/to/folder | gpg2 -se -v -R KEYID -u KEYID > /path/to/backup.tar.pgp

This works well, but the file has to be recreated each time I run the backup.

Does anybody know of a way to create similar encrypted folder backups, where only new or modified files get added/updated in the archive? I'd prefer not to decrypt the tar file temporarily.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-10-08 07:03:50 -0500

none gravatar image

Tar doesn't support gpg encryption, so tar won't know, what files were changed from last time. More to that, you are using redirecting '>', so it will always create new file instead updating it.

My solution is to create encrypted disk image, or encrypt your destination place for this archive, and not to encrypt tar. Then you could use -u in tar. You can use in fedora LUKS or eCryptfs

edit flag offensive delete link more


I was kind-of aware of these alternative solutions, but will have a look at them again - thanks

cconrad gravatar imagecconrad ( 2013-10-08 11:51:59 -0500 )edit

answered 2014-05-15 21:37:59 -0500

sparks gravatar image

Deja-dup, the GUI on top of duplicity, supports creating GPG-encrypted files for your backups. It does incremental backups and full backups and basically manages your entire backup process. You may want to try that out.

edit flag offensive delete link more

Question Tools


Asked: 2013-10-06 08:27:45 -0500

Seen: 177 times

Last updated: May 15 '14