Jump to content


- - - - -

How to: Use 7Zip to create password protected ZIPs on CentOS 7

CentOS 7

  • Please log in to reply
No replies to this topic

#1 Wilson18



  • root
  • 112 posts
  • LocationUniversity of Birmingham

Posted 24 April 2015 - 03:04 AM

The first step is to download and add the repository


wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm

sudo rpm -ivh  rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm

You can then install it

sudo yum install p7zip -y
To use this to create a password protected zip file, you can use the following command - Make sure to replace the password with your own (you can use special characters) and the correct directories. 
7za a -tzip -p'PASSWORD HERE' -mem=AES256 "/place/to/store/backups/backup.zip" /directory/* -R

You can also include the date in the file name like this

7za a -tzip -p'PASSWORD HERE' -mem=AES256 "/place/to/store/backups/$(date +%d-%m-%Y).zip" /directory/* -R

List what you read?

Check me out on: YouTube, Twitter, Facebook, Google+

Also tagged with one or more of these keywords: CentOS 7