https://github.com/xruff/backup-db-to-dropbox
Php script to backup collection of mysql databases to dropbox app folder.
https://github.com/xruff/backup-db-to-dropbox
Last synced: about 1 year ago
JSON representation
Php script to backup collection of mysql databases to dropbox app folder.
- Host: GitHub
- URL: https://github.com/xruff/backup-db-to-dropbox
- Owner: XRuff
- License: mit
- Created: 2020-05-14T14:00:51.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-15T22:32:57.000Z (about 6 years ago)
- Last Synced: 2025-02-07T09:28:54.288Z (over 1 year ago)
- Language: PHP
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# backup-db-to-dropbox
Php script to backup collection of mysql databases to dropbox app folder.
Requirements
------------
Package requires PHP 7.1 or higher
Short Documentation
------------
Clone repository:
```sh
$ git clone https://github.com/XRuff/backup-db-to-dropbox.git
```
Install dependecies:
```sh
$ cd backup-db-to-dropbox
$ composer install
```
Create config file from example file:
```sh
$ cp config/config.neon.example config/config.neon
```
Modify config file:
```yaml
# config/config.neon
parameters:
# Data folder is local temp dir to temporarily store processing mysql dump
# Script cleans it after uploading to dropbox. Filder must be writable.
dataFolder: '/data' # mandatory
# date with time is part of stored dump file
dateFormat: Y-m-d-h-i-s # optional, default is Y-m-d-h-i-s
# if yes, databae dump is gzipped (.gz file)
compress: yes # optional, default is yes
dropbox:
# see https://www.dropbox.com/developers/apps/create, create app and then accessTonen.
# No app key or app secret nor OAuth settings needed
token: # mandatory
# creates current date folder in dropbox using format yyyy-mm-dd
dateFolders: yes # optional, default is yes
# if yes, reports curl comunication with dropbox server
verbose: no # optional, default is no
# mandatory Credentials for database access
database:
server: 127.0.0.1 # mandatory, mysql server
user: root # mandatory, mysql user
password: # optional, mysql password
# mandatory list of names of databases you want to backup. DB user must have access to them.
databases:
- my_database
- my_second_database
```
Run it:
```sh
$ php index.php
```
or bash script (have to be executable)
```sh
$ ./run.sh
```