I'm trying to make a backup
.sh script to zip my files and to protect the zip archive with a password.
For that, I'm using the
zip package (
apt-get install zip) and there's an encryption option accessible via the
-e parameter. How can I specify the password directly? After typing the command, I need to enter a password, and the
.sh-script will be run with cron jobs.
Here's my .sh file:
zip -r -e -q ~/var/backup/backup_`date +%Y_%m_%d-%H_%M` /var/www/
Here's the result with the
How can I automatically set a password and then retype it in a
.sh-file (that will be ran with cronjobs)?