Every night I'm running a cron backup script, that gathers the files that I think is essential for the system and stores then in Info-ZIP archives. What I really would like is to encrypt these archives, but is it possible to do this without user input ?

Thanks in advance /flywheel

asked 29 Jun '11, 13:31

flywheel's gravatar image

accept rate: 0%

edited 05 Jul '11, 18:29

In short yes it is.

The real question is why are you encrypting them, and where are you storing them once encrypted. You can use a couple of methods to encrypt the data, but you will need to have a key, or password stored in the script or on the box doing the encrypting. GPG is a simple method of doing this, there are much more complicated version of this procedure as well.

To encrypt the file you would use something like:

gpg –yes –passphrase [MY PASS PHRASE] -c [FILENAME]

not the -c tells is to use symmetric encryption

and to decrypt the file:

gpg –yes –passphrase [MY PASS PHRASE] [FILENAME]

answered 05 Jul '11, 10:50

rfelsburg's gravatar image

rfelsburg ♦
accept rate: 25%

Jeez - I spent 20 minutes with the gpg documentation and never saw that - I wonder what else I have missed over the years.

Cool - many thanks

(05 Jul '11, 18:23) flywheel
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 29 Jun '11, 13:31

Seen: 1,395 times

Last updated: 05 Jul '11, 18:29

powered by OSQA