Home

Awesome

BackMeUp

⚠️This repository is deprecated. Use proper tools such as rclone, docker backup scripts etc. Hence the repository is now read-only as of 2024.05.16 ⚠️

BackMeUp is an automated MySQL databases and files backup solution on Linux Machines using Amazon S3, Dropbox, Mega.nz and WebDAV (NextCloud etc.) as remote storage.

  ____             _    __  __      _    _       
 |  _ \           | |  |  \/  |    | |  | |      
 | |_) | __ _  ___| | _| \  / | ___| |  | |_ __  
 |  _ < / _, |/ __| |/ / |\/| |/ _ \ |  | | '_ \ 
 | |_) | (_| | (__|   <| |  | |  __/ |__| | |_) |
 |____/ \__,_|\___|_|\_\_|  |_|\___|\____/| .__/ 
                                          | |    
                                          |_|    

Why?

I'm managing my own server, and I wanted to have a simple and easy tool to backup my database and all VirtualHost files, and to save them into a remote server with cronjob.

What This Script Does

This script does some simple tasks:

You may easily add this script to your crontab, and just forget about it :smile:

Requirements

Installation

Configuration Values

After downloading the script, before running, you must edit your configuration values found in ~/.backmeuprc.

On-the-fly Configuration

You can set various configuration values on the fly. Here are some full featured examples:

backmeup -tz "Europe/Istanbul" -dbh localhost -dbu root -dbpass "rootpass" -dbp 3306 -f "/usr/share/nginx/html" -b "/tmp" -bf=my_backups -c 7z -7zcp "p4ssw0rd" -m s3 -s3bn my-aws-bucket -wdu "webdav-user" -wdp "webdav-password" -webdav "https://nextcloud-host.com/remote.php/webdav/"

Or like this:

backmeup --timezone="Europe/Istanbul" --database-host="localhost" --database-user="root" --database-password="rootpass" --database-port="3306" --files-root="/usr/share/nginx/html" --base-folder="/tmp" --compression="7z" --7-zip-compression-password="p4ssw0rd" --backup-folder="my-remote-backup-folder" --webdav-user="webdav-user" --webdav-password="webdav-password" --webdav="https://nextcloud-host.com/remote.php/webdav/"

None of these are mandatory, you can just use any of these however you want, and even mix together!

Usage

Important Notice

This script saves MySQL password (any user which can show and dump (all) databases will suffice actually) inside, but it's only accessible by its owner and cannot be read by anyone else. In any ways, use it at your own risk. I'm not holding any responsibilities for any damage that this script may do (which shouldn't).

Additional Notes

Screenshots

Special Thanks

@andreafabrizi for maintaining the Dropbox-Uploader script.

TODOs

Version History

1.5.0

1.4.0

1.3.0

1.2.0

1.1.0

1.0.1

1.0.0

0.1.1

0.1.0

Buy me a coffee or beer!

Donations are kindly accepted to help develop my projects further.

BTC: 1QFHeSrhWWVhmneDBkArKvpmPohRjpf7p6

ETH / ERC20 Tokens: 0x3C2b0AC49257300DaB96dF8b49d254Bb696B3458

NEO / Nep5 Tokens: AYbHEah5Y4J6BV8Y9wkWJY7cCyHQameaHc

License

MIT