All Projects → Ardakilic → backmeup

Ardakilic / backmeup

Licence: MIT license
BackMeUp: An automated MySQL / MariaDB databases and files backup solution on *nix Machines using Amazon S3, WebDAV (ownCloud / NextCloud etc.), Google Drive and Dropbox.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to backmeup

Rclone
"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Yandex Files
Stars: ✭ 30,541 (+38076.25%)
Mutual labels:  dropbox, google-drive, webdav, rclone
Filestash
🦄 A modern web client for SFTP, S3, FTP, WebDAV, Git, Minio, LDAP, CalDAV, CardDAV, Mysql, Backblaze, ...
Stars: ✭ 5,231 (+6438.75%)
Mutual labels:  dropbox, google-drive, webdav
Floccus
☁️ Sync your bookmarks privately across browsers
Stars: ✭ 2,630 (+3187.5%)
Mutual labels:  nextcloud, owncloud, webdav
rclone-drive
☁️Simple web cloud storage based on rclone, transform cloud storage (s3, google drive, one drive, dropbox) into own custom web-based storage
Stars: ✭ 30 (-62.5%)
Mutual labels:  dropbox, google-drive, rclone
Joplin
Joplin - an open source note taking and to-do application with synchronization capabilities for Windows, macOS, Linux, Android and iOS. Forum: https://discourse.joplinapp.org/
Stars: ✭ 26,916 (+33545%)
Mutual labels:  dropbox, nextcloud, webdav
Ytdlrc
☁️ Downloads videos and metadata with youtube-dl and moves each file on completion to an rclone remote
Stars: ✭ 140 (+75%)
Mutual labels:  dropbox, google-drive, rclone
Qownnotes
QOwnNotes is a plain-text file notepad and todo-list manager with markdown support and Nextcloud / ownCloud integration.
Stars: ✭ 2,357 (+2846.25%)
Mutual labels:  dropbox, nextcloud, owncloud
Cyberduck
Cyberduck is a libre FTP, SFTP, WebDAV, Amazon S3, Backblaze B2, Microsoft Azure & OneDrive and OpenStack Swift file transfer client for Mac and Windows.
Stars: ✭ 1,080 (+1250%)
Mutual labels:  dropbox, google-drive, webdav
ccViewer
CryptCloudViewer source codes
Stars: ✭ 66 (-17.5%)
Mutual labels:  dropbox, google-drive, rclone
Oneupflysystembundle
A Flysystem integration for your Symfony projects.
Stars: ✭ 541 (+576.25%)
Mutual labels:  dropbox, aws-s3
anyfs
Portable file system for Node
Stars: ✭ 17 (-78.75%)
Mutual labels:  dropbox, aws-s3
Fileprovider
FileManager replacement for Local, iCloud and Remote (WebDAV/FTP/Dropbox/OneDrive) files -- Swift
Stars: ✭ 724 (+805%)
Mutual labels:  dropbox, webdav
Stackedit
In-browser Markdown editor
Stars: ✭ 18,744 (+23330%)
Mutual labels:  dropbox, google-drive
Meteor Files
🚀 Upload files via DDP or HTTP to ☄️ Meteor server FS, AWS, GridFS, DropBox or Google Drive. Fast, secure and robust.
Stars: ✭ 1,033 (+1191.25%)
Mutual labels:  dropbox, aws-s3
Elodie
An EXIF-based photo assistant, organizer, manager and workflow automation tool.
Stars: ✭ 840 (+950%)
Mutual labels:  dropbox, google-drive
Simpleupload
Simple upload system in PHP, compatible with AWS S3, Dropbox, Azure and others.
Stars: ✭ 85 (+6.25%)
Mutual labels:  dropbox, aws-s3
Importexportfree
Improve default Magento 2 Import / Export features - cron jobs, CSV , XML , JSON , Excel , mapping of any format, Google Sheet, data and price modification, improved speed and a lot more!
Stars: ✭ 160 (+100%)
Mutual labels:  dropbox, google-drive
Vscode Remote Workspace
Multi protocol support for handling remote files like local ones in Visual Studio Code.
Stars: ✭ 197 (+146.25%)
Mutual labels:  dropbox, webdav
bim360appstore-data.management-nodejs-transfer.storage
Autodesk design file transfer app: Transfers files from Autodesk (BIM 360, Fusion 360) to other Storages (Dropbox, Box, Onedrive, Google Drive, Egnyte)
Stars: ✭ 28 (-65%)
Mutual labels:  dropbox, google-drive
PandaNote
iOS markdown Note App / iOS的markdown笔记应用
Stars: ✭ 32 (-60%)
Mutual labels:  dropbox, webdav

BackMeUp

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:

  • The script dumps all of your MySQL databases individually.
  • The script backs up all of your Web files (e.g: root path of all of your virtual hosts).
  • The script compresses your web-root and databases to a single archive.
  • The script uploads the compressed archive into a folder in your Dropbox account, Amazon S3 bucket, Mega.nz or to a WebDav solution such as OrnCloud/NextCloud Server.
  • If the method is set to dropbox, The script makes sure that you always have the newest Dropbox-Uploader script.
  • After the upload, the script cleans up the temporary files (dumps, the archive itself).

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

Requirements

  • curl - To download the .backmeuprc file, Dropbox-uploader script and to upload the backup to Dropbox or to WebDAV.
  • mysql (cli) - To list databases.
  • 7z (cli) - To list compress backup if compression is set as 7zip, or tar (cli) if compression is set as tar.
  • mysqldump - To dump databases (in most cases, it comes with mysql cli).
  • aws-cli must be installed and configured if the method is set as s3.
  • mega-cmd (the mega-put command is used that comes with the package) must be installed and configured if the method is set as mega.

Installation

  • Run these commands first:

    curl -s https://raw.githubusercontent.com/Ardakilic/backmeup/master/backmeup.sh -o backmeup.sh
    curl -s https://raw.githubusercontent.com/Ardakilic/backmeup/master/.backmeuprc -o ~/.backmeuprc
    chmod 600 ~/.backmeuprc
  • Now, edit the configuration values as stated here.

  • Make the files secure, executable and only accessible by your root user and group (or the user you'd like the script to run):

    chown root:root backmeup.sh #or any user and group who will run the script or with cron
    chown root:root ~/.backmeuprc #or any user and group who will run the script manually or with cron
    chmod 400 ~/.backmeuprc #Only readable by owner, and is read-only. To make it writable, change to 600 on demand
    chmod +x backmeup.sh
  • (Suggested) Copy or move the script into one of the PATHs as stated here.

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

  • Execute the configured script:

    ./backmeup.sh #or "backmeup" directly if it's in your PATH.
  • If this is the first attempt to running and method is set to dropbox, Dropbox-Uploader will ask for an APP key and secret. You should create an application, provide these values and click on provided authorization link (Don't worry, the Dropbox-uploader has a nice wizard which guides you, can't be easier). After you've authorized, re-run the script using ./backmeup.sh

  • If everything went well, in a couple of minutes, you should see your database and files copied into the remote server.

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

  • You can also copy the script to one of your PATHS, such as /usr/local/bin/backmeup and run from there directly. This is suggested

Screenshots

Special Thanks

@andreafabrizi for maintaining the Dropbox-Uploader script.

TODOs

  • Tests on CentOS, Arch etc.
  • WebDAV (Owncloud etc.) Integration
  • AWS S3 integration
  • Increased security? (backup is encrypted with a password now for 7zip archives)
  • Reading configuration from an external file
  • Postgres support
  • Option to dump only the database(s) or only Virtualhost files
  • Multiple Virtualhost folder support

Version History

1.5.0

  • Google drive feature implemented
  • A minor fix on creating folders step

1.4.0

  • Mega.nz integration implemented

1.3.0

  • 7-zip archive support
  • Encryption support for 7-zip archives.

1.2.0

  • WebDAV (Owncloud etc.) Integration: You can now upload your backup files to your WebDAV server using WebDAV bridge and curl. You can refer to updated .backmeuprc and update if necessary.

1.1.0

  • You can now define "Database Host" and "Database Port" parameters, so you may even get dumps from remote services such as Amazon RDS. DBHOST and DBHOST values should be added in .backmeuprc
  • The version numbers will follow Semantic Versioning from now on.

1.0.1

  • External configuration file support. Now you can update backmeup hassle-free! The file's located at: ~/.backmeuprc
  • Amazon S3 Storage Class Support: Now you can set how the backup will be stored (Normal or Infrequent Access or Reduced Redundancy for lesser storage costs).
  • An issue with Dropbox-uploader download path is fixed.

1.0.0

  • Amazon S3 support (using official aws-cli)
  • The code is optimised to use in cron
  • Arguments and options support. You can pass the arguments and options to the script on-the-fly

0.1.1

  • Defined PATHs to the script so that it should work better on cron withot needing to define before running.

0.1.0

  • Initial Release

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].