Database Backup檔案加密

來源:互聯網
上載者:User

一、tar+openssl對檔案加密:

在目前的目錄下有一個test目錄的檔案夾:

1、使用tar對檔案壓縮加密:

# tar -zcvf - pma|openssl des3 -salt -k password | dd of=test.des3

完成將得到一個test.des3的打包檔案,用你設定的密碼替換password。

2、使用tar對加密檔案解壓:

# dd if=test.des3 |openssl des3 -d -k password|tar zxf -

注意:命令最後有”-”,它將釋放所有的檔案。其中-k password可以不使用,這樣執行完命令後會提示你輸入密碼,加上-k參數表示在程式中自動驗證密碼。

可參考:http://www.ha97.com/5114.html

二、採用秘鑰的方式對備份檔案加密傳輸。

另附:查看打包壓縮檔中包含的內容

tar  -ztf test.tar.gz

tar  -jtf test.tar.bz2

本文出自 “My DBA life” 部落格,請務必保留此出處http://huanghualiang.blog.51cto.com/6782683/1293800

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.