Skip to content

Instantly share code, notes, and snippets.

@lucassmacedo
Last active August 22, 2019 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucassmacedo/d966f16d9ea46b2f2bdb8a5919a5083b to your computer and use it in GitHub Desktop.
Save lucassmacedo/d966f16d9ea46b2f2bdb8a5919a5083b to your computer and use it in GitHub Desktop.
Comandos Linux Importantes
# Deleta todos processos de um certo nome
kill $(ps aux | grep 'phpstorm' | awk '{print $2}')
# Backup and Restore Database TAR PGQSL
PGPASSWORD="" pg_dump -h localhost -U postgres -F t database_name > /bkp/postgres/postgres-`hostname`-producao.tar
PGPASSWORD="" pg_restore -U postgres -d database_name /bkp/postgres/postgres-`hostname`-producao.tar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment