https://github.com/marcusmyers/s3backup
PHP CLI tool to backup to s3
https://github.com/marcusmyers/s3backup
aws-s3 backup cli php
Last synced: 3 months ago
JSON representation
PHP CLI tool to backup to s3
- Host: GitHub
- URL: https://github.com/marcusmyers/s3backup
- Owner: marcusmyers
- Created: 2016-09-27T01:54:14.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-04-29T15:00:57.000Z (about 4 years ago)
- Last Synced: 2025-01-15T13:59:59.466Z (5 months ago)
- Topics: aws-s3, backup, cli, php
- Language: PHP
- Size: 118 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# S3 Backup
The `s3backup` cli tool uses a configuration file to setup and backup
directories on your computer to S3.## Install
`composer global require "marcusmyers/s3backup=~2.0.0"`Make sure to place the ~/.composer/vendor/bin directory in your PATH so
the s3 executable is found when you run the `s3backup backup` command in
your terminal.## Configure
Once installed on your machine you will need to run `s3backup init` as
it should create the following directory `$HOME/.s3backup` and
`config.json` file in that directory. Open up the `config.json` file and
edit it to your liking, below are a couple examples:```json
{
"aws": {
"credentials": {
"key": "",
"secret": ""
},
"bucket": "my-backup-bucket",
"file_prefix": "my_backups"
},
"filename": "my_laptop_backup",
"directories": [
"/Users/exampleUser/Desktop/Logos",
"/var/www/html",
"/Users/exampleUser/Documents"
]
}
``````json
{
"aws": {
"credentials": {
"key": "",
"secret": ""
},
"bucket": "my-bucket",
"file_prefix": "my_backups"
},
"filename": "my_laptop_backup",
"directories": []
}
```## Usage
If you don't setup any directories in the config file you can run backup
any folder you want by running the following:```
s3backup backup path/to/file/or/directory
```If you have predefined directories in your config file you can simply
run:```
s3backup backup
```You can also set an environment variable to only have to run `s3backup`
like below:```
export S3_BACKUP_SINGLE_COMMAND=1
s3backup
```