Using GPG to encrypt tape backups
Mon Aug 5 13:35:28 2002
I'm trying to use GPG as a filter to encrypt my tape backups:
tar cf - backup | gpg -e -r myID -z 9 -o /dev/nst0
The problem is that GPG wants to prompt because /dev/nst0 exists.
If I answer "y" it works fine, but I'm trying to automate this. If I use
--batch, it complains about the existing file and aborts.
I have also tried without the output option, instead redirecting
stdout to /dev/nst0, but I get "write error: Invalid argument" errors.
I even tried piping gpg to dd of=/dev/nst0 bs=512, but no go either.
It does't seem to be possible to use gpg as a filter in this manner.
Does anyone have any ideas? I would like to see an option to
overwrite the output file, but chances are slim that will be done.
Creating a temporary file and dumping that is not an option.