mirror of
https://github.com/Chouchen/Shikiryu_Backup.git
synced 2021-06-30 16:02:14 +02:00
parent
3fe73c9b0b
commit
c18d517afb
69
README.md
69
README.md
@ -1 +1,70 @@
|
|||||||
|
# Shikiryu Backup ![language](https://img.shields.io/badge/language-php-blue.svg) ![issues](https://img.shields.io/github/issues-raw/Chouchen/Shikiryu_backup)
|
||||||
|
|
||||||
|
> Because even small websites need to be backed up
|
||||||
|
|
||||||
Backup script for limited shared hosting
|
Backup script for limited shared hosting
|
||||||
|
|
||||||
|
## :books: Table of Contents
|
||||||
|
|
||||||
|
- [Installation](#package-installation)
|
||||||
|
- [Usage](#rocket-usage)
|
||||||
|
- [Support](#hammer_and_wrench-support)
|
||||||
|
- [Contributing](#memo-contributing)
|
||||||
|
- [License](#scroll-license)
|
||||||
|
|
||||||
|
## :package: Installation
|
||||||
|
|
||||||
|
### First check if you have composer installed
|
||||||
|
|
||||||
|
Before installing this, you need to check if you have `PHP`and `Composer` installed on your computer.
|
||||||
|
|
||||||
|
### Then install this script
|
||||||
|
|
||||||
|
```sh
|
||||||
|
composer require shikiryu/backup
|
||||||
|
```
|
||||||
|
|
||||||
|
## :rocket: Usage
|
||||||
|
|
||||||
|
Everything in this library is based on a scenario (or multiple scenarii).
|
||||||
|
|
||||||
|
It consists of 2 sections in a JSON file :
|
||||||
|
* what to backup
|
||||||
|
* where to backup
|
||||||
|
|
||||||
|
You have an example file in `app/scenario`.
|
||||||
|
|
||||||
|
The first section is `backup` (what to backup) and the second `transport`
|
||||||
|
|
||||||
|
More information about [how to use scenario](docs/using-scenario.md)
|
||||||
|
|
||||||
|
|
||||||
|
### Tips
|
||||||
|
|
||||||
|
Each possible section has docs in [their respective folders](docs/configuration)
|
||||||
|
|
||||||
|
Here is an example code
|
||||||
|
|
||||||
|
```php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
include_once 'vendor/autoload.php';
|
||||||
|
|
||||||
|
try {
|
||||||
|
\Shikiryu\Backup\Scenario::launch('backup.json'); // whatever the file name you gave previously
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
echo $e->getMessage();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## :hammer_and_wrench: Support
|
||||||
|
|
||||||
|
Please [open an issue](https://github.com/Chouchen/Shikiryu_Backup/issues/new) for support.
|
||||||
|
|
||||||
|
## :memo: Contributing
|
||||||
|
|
||||||
|
Please contribute using [Github Flow](https://guides.github.com/introduction/flow/). Create a branch, add commits, and [open a pull request](https://github.com/Chouchen/Shikiryu_Backupleonard-henriquez/readme-boilerplateleonard-henriquez/readme-boilerplate/compare/).
|
||||||
|
|
||||||
|
## :scroll: License
|
||||||
|
|
||||||
|
[Creative Commons Attribution NonCommercial (CC-BY-NC)](https://tldrlegal.com/license/creative-commons-attribution-noncommercial-(cc-nc)) © [Chouchen](https://github.com/Chouchen/)
|
||||||
|
@ -24,6 +24,13 @@
|
|||||||
"subject" : "[Example.net] backup of the day",
|
"subject" : "[Example.net] backup of the day",
|
||||||
"message" : "Hi,\n\nYou can find your backup in this mail.\n\nRegards,\nMyself."
|
"message" : "Hi,\n\nYou can find your backup in this mail.\n\nRegards,\nMyself."
|
||||||
},
|
},
|
||||||
|
"Sftp": {
|
||||||
|
"host" : "sftp.domain.com",
|
||||||
|
"port" : "22",
|
||||||
|
"login" : "login",
|
||||||
|
"password" : "password",
|
||||||
|
"folder" : "/folder"
|
||||||
|
},
|
||||||
"Ftp": {
|
"Ftp": {
|
||||||
"host" : "ftp.domain.com",
|
"host" : "ftp.domain.com",
|
||||||
"login" : "login",
|
"login" : "login",
|
||||||
@ -32,6 +39,9 @@
|
|||||||
},
|
},
|
||||||
"Folder": {
|
"Folder": {
|
||||||
|
|
||||||
|
},
|
||||||
|
"Dropbox": {
|
||||||
|
"token": "123456789123456789"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
21
docs/configuration/transport/dropbox.md
Normal file
21
docs/configuration/transport/dropbox.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Dropbox transport configuration
|
||||||
|
|
||||||
|
## JSON
|
||||||
|
```
|
||||||
|
"Dropbox": {
|
||||||
|
"token": "your-token-here",
|
||||||
|
},
|
||||||
|
```
|
||||||
|
## General
|
||||||
|
|
||||||
|
To generate your access token, you need to go to your [`App Console`](https://www.dropbox.com/developers/apps).
|
||||||
|
|
||||||
|
Then,
|
||||||
|
1. Create a new app
|
||||||
|
2. Select DropboxAPI, "App folder" and give it a unique name.
|
||||||
|
3. Click on the button next to "Generate access token"
|
||||||
|
|
||||||
|
## Options
|
||||||
|
token (mandatory) = access token
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user