Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 1.72 KB

README.md

File metadata and controls

48 lines (35 loc) · 1.72 KB

encrypted-email-backup

A simple script to backup your server to a email address as an encrypted compressed backup. The script itself is independent of your software being backed up, just pipe it the the backup (for multiple files, use tar).

Developed to support an article sponsored by the VpsBoard article bounty program.

Features

  • Assymetric and Symetric encryption modes
  • Backup compression
  • Simple
  • Reports backup failures via email

Requirements

  • mutt: To send emails
  • openssl: For encryption, compiled with zlib support
  • bash: language of the script

Limitations

Mail is sent with the backup as an attachment, you may be limited by the attachment size of your mail provider if you are not using your own mail server. See the wishlist if you want to develop an alternative upload method.

Usage

How to Use

Using this software is simple, its just a matter of piping your backup to the script, and supplying the required parameters.

Usage

Encrypted Backup Script

Usage:
./backup.sh backup [KEY] [FILENAME] [EMAIL] [SUBJECT]
Description: Take the backup supplied via stdin, compress, encrypt and email to [email protected]
Example: take_backup | ./backup.sh backup ~/backup.key backup.sql [email protected] "Database Backup"

cat file.sql.gz.enc | ./backup.sh decrypt [KEY] > file.sql
Description: Decrypt the file file.sql.gz.enc to file.sql

Instructions & Examples

See the post at: https://vpsboard.com/page/index.html/_/linux-vps-tutorials/how-to-create-secure-linux-server-backups

Planned Features / Wishlist

  • FTP Upload & HTTP Download
  • Dropbox or Cloud service upload / download

Feel free to submit a pull request.

License

The MIT License (MIT). See LICENSE.