Web application written in Django
- Install CentOS7 on Sakura VPS
- Generate SSH keys (like $ ssh-keygen -t rsa)
- Paste public key to GitHub settings
- Clone the repo from VPS server on /home directory
- Run setup scripts($ ./scripts/setup_sakura.sh)
Dump the current database to a json file
-
./manage.py dumpdata products --format=json --indent=2 > products.json
-
Check if media directory exists
Download json database file and media directory from remote production to local
- scp user@ip_addr:/path/to/products.json /path/to/local
- scp -r user@ip_addr:/path/to/media /path/to/local
Inject products database to local
- ./manage.py loaddata products