Backend scripts and extras for clipd
Below are some short tutorials for editing the backend of clipd
Steps to backup the clipd Heroku PostgreSQL DB and restore it locally: Somewhat helpful reference: https://devcenter.heroku.com/articles/heroku-postgres-import-export
- Ideally take site down for maintanence
- open up a bash shell with the heroku command functioning locally
- enter w/o quotes: "heroku pg:backups:capture -a clipd"
- enter w/o quotes: "heroku pg:backups:download -a clipd"
- Make sure you're in the directory of latest.dump. Store it somewhere if appropriate.
- enter w/o quotes: "PGPASSWORD=rorodog pg_restore --verbose --clean --no-acl --no-owner -h localhost -U postgres -d csgo_highlights latest.dump"
- Start server if previously shut down for maintanence
Steps to restore an instance to the Heroku instance from local instance:
- Ideally take site down for maintanence
- open up a windows cmd window
- in pgadmin, right click on DB and click Backup...
- Don't change any settings except filename, to the form "csgo_highlights_backup_MM_DD_YY.backup"
- Upload backup to AWS S3 Bucket
- Right click on file, click Make Public
- Make sure the S3 profile is public itself
- Click on the item and copy the URL looking like "https://csgo-highlights-db.s3.us-east-2.amazonaws.com/name.backup"
- enter w/o outer quotes in cmd: "pg:backups:restore "step7link" postgresql-convex-91631 -a clipd"
- enter w/o quotes to check if running properly: "heroku pg -a clipd"
- Start server if previously shut down for maintanence
Details for Reddit account: email - [email protected] username - clipd-official password - 72ED865568032
Details for Twitch account: email - [email protected] username - clipdofficial password - f;PB2p:kHG&L
Repo for downloading twitch clips: https://github.com/ihabunek/twitch-dl