This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Adiciona repositório que contém o PostgresSQL 9.1 (obsoleto) | |
echo "Adicionando repositório que contém o PostgresSQL 9.1 (obsoleto)" | |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" > /etc/apt/sources.list.d/pgdg.list' | |
# Adiciona repositório que contém o Tomcat 7 (obsoleto) | |
echo "Adicionando repositório que contém o Tomcat 7 (obsoleto)" | |
sudo sh -c 'echo "deb http://br.archive.ubuntu.com/ubuntu/ xenial main" > /etc/apt/sources.list.d/tomcat7.list' | |
sudo sh -c 'echo "deb http://br.archive.ubuntu.com/ubuntu/ xenial universe" >> /etc/apt/sources.list.d/tomcat7.list' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DUMP | |
// pod-name name of the postgres pod | |
// postgres-user database user that is able to access the database | |
// database-name name of the database | |
kubectl exec [pod-name] -- bash -c "pg_dump -U [postgres-user] [database-name]" > database.sql | |
RESTORE | |
// pod-name name of the postgres pod | |
// postgres-user database user that is able to access the database | |
// database-name name of the database |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
du -k * | sort -nr | cut -f2 | xargs -d '\n' du -sh |