[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

encrypted zip with linux

Posted on 2006-11-25
7
Medium Priority
?
1,617 Views
Last Modified: 2008-01-16
hi

I use this command to ackup and zip my database:

"mysqldump  -h $server -u $username -p$password -q $database | gzip > $path "

is there a way to encrypt the ziped file .. ?

thx
0
Comment
Question by:uk1900
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 58

Expert Comment

by:amit_g
ID: 18013655
Use crypt ...

crypt YourSecretKey < $path > TheEncryptedFile

To decrypt use

crypt YourSecretKey < TheEncryptedFile >  $path

Don't lose YourSecretKey.
0
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 400 total points
ID: 18015160
or you could actually use zip.

zip -e .......
0
 

Author Comment

by:uk1900
ID: 18015669
thx guys for your help,

u mean I can write :  zip -e $password   in the following command ?

"mysqldump  -h $server -u $username -p$password -q $database | zip -e $password > $path "
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 58

Accepted Solution

by:
amit_g earned 800 total points
ID: 18015793
If you want to do this in one line,

mysqldump  -h $server -u $username -p$password -q $database | gzip | crypt YourSecretKey > $path

If you want to use zip, you can do

mysqldump  -h $server -u $username -p$password -q $database | zip -e > $path

but in case of zip the password (key) is to be entered on the prompt. The command would propnt you to enter a password twice. You can't give that password in command line.
0
 
LVL 30

Assisted Solution

by:Kerem ERSOY
Kerem ERSOY earned 400 total points
ID: 18017719
Hi,

zip -e  will always ask for apssword from the standard input and if standard input is redirected to soemwhere else it will print an error message and exit. So it is not possible to run it noninteractively.

For crypt is not a standard application I will suggest you to use GnuPGP. It is a part of most inux Distros.

Visit here for usage info:
http://www.somacon.com/p107.php
http://www.cyberciti.biz/tips/linux-how-to-encrypt-and-decrypt-files-with-a-password.html

Cheers,
K.
0
 
LVL 16

Assisted Solution

by:xDamox
xDamox earned 400 total points
ID: 18019904
Hi,

Have you considered using the GnuGPG when you have your keys setup to encrypt files you simply do:

gpg -e file.zip

Have a read of the following guide I did;

http://www.linux-noob.com/forums/index.php?showtopic=1475
0
 

Author Comment

by:uk1900
ID: 18021672
thx guys for your help
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question