Skip to content

Instantly share code, notes, and snippets.

@jonathancg90
Last active February 23, 2017 22:35
Show Gist options
  • Save jonathancg90/8da873109174ea2caabd to your computer and use it in GitHub Desktop.
Save jonathancg90/8da873109174ea2caabd to your computer and use it in GitHub Desktop.
*) pg_dump <database> -U <ususario> -h localhost --no-owner -W > backup.sql
*) scp condor:/var/www/journeyou/myapp_db_backup.sql /Users/jonathan/projects/backups
*) scp [email protected]:/home/usuario/archivo.txt Documentos
*) Restaure: psql dbname < infile
*) pg_restore -h localhost -p 5432 -U postgres -d gotham -v -Fc backup-prod-2017-01-30-6pm.dump
*) sudo -i -u postgres
*) cd ~/.virtualenvs
*) pg_restore -h localhost -p 5432 -U crehana -d gotham -v -Fc backup-prod-2017-02-20-9am.dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment