Home

Awesome

argentina-backup

TODO:

Installation

  1. Clone this repository.
  2. Copy env_default to .env, and then configure it.
  3. Run composer install.

Env variables tips:

BACKUP_STORAGE=local,gdrive

Usage

Run on your terminal

php run.php bk

Upload to S3

BACKUP_STORAGE: s3     
AWS_KEY="simple-key"
AWS_SECRET="mysecret-key"
AWS_REGION="some-aws-region"
AWS_BUCKET="your-awesome-bucket-name"

Upload to Google Drive

GOOGLE_CLIENT_ID="sample-google-client-id"
GOOGLE_SECRET_KEY="sample-google-secret-key"
GOOGLE_REFRESH_TOKEN="sample-google-refresh-token"
# OPTIONAL FOLDER ID
GOOGLE_FOLDER_ID="sample-google-folder-id"

Crontab

You can add this script as a cronjob, for example, if you want to backup every day at 2am, just run in your terminal crontab -e and append the line below:

0 2 * * * php /home/ubuntu/argentina-backup/run.php bk