##Backup
$ pg_dump banco > arquivo.sql
###Backup de apenas uma tabela
$ pg_dump banco -t tabela > arquivo.sql
##Restore
# Add the remote, call it "upstream": | |
git remote add upstream https://github.com/whoever/whatever.git | |
# Fetch all the branches of that remote into remote-tracking branches, | |
# such as upstream/master: | |
git fetch upstream | |
# Make sure that you're on your master branch: |
##Backup
$ pg_dump banco > arquivo.sql
###Backup de apenas uma tabela
$ pg_dump banco -t tabela > arquivo.sql
##Restore
mvn archetype:generate -DgroupId=org.ccb.patrimonio -DartifactId=patrimonio -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false | |
mvn eclipse:eclipse -Dwtpversion=2.0 |
/etc/init.d/postgresql restart |
O PostgreSQL oferece boas ferramentas para backup. Nesta dica vou explicar o funcionamento do pg_dump, a ferramenta mais usada para fazer backup no PostgreSQL. | |
No console do PostgreSQL no Linux, digite o seguinte comando: | |
$ pg_dump <nome_da_base_de_dados> > nome_arq_texto_bkp | |
Onde: | |
nome_da_base_de_dados: é o nome do banco de dados que você quer fazer o backup. | |
nome_arq_texto_bkp: este vai ser o arquivo que guardará todas as informações do banco de dados. |
1) Ativar o módulo de redirecionamento de URL | |
sudo a2enmod rewrite | |
2) Entrar no arquivo /etc/apache2/sites-available/default e substituir todas as chamadas de "AllowOverride None" por "AllowOverride All" | |
3) Criar um arquivo ".htaccess" na raiz da aplicação com o seguinte conteúdo: | |
<IfModule mod_rewrite.c> | |
Options -MultiViews |
sudo apt-get install python-software-properties | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:ondrej/php5-oldstable | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install php5 |
sudo apt-get --purge remove postgresql postgresql-client postgresql-client-common | |
sudo apt-get autoremove | |
caso ainda fique alguma pasta: sudo rm -rfv opt/Postgres |
The trick was to open the Command Prompt as administrator and start the Device Manager from the same command prompt. | |
1. Right-click “Command Prompt” in Accessories and choose “Run as Administrator” | |
2. Enter “set devmgr_show_nonpresent_devices=1″ – without the quotes obviously | |
3. Enter “start devmgmt.msc” | |
4. In the box that opens, select “Show hidden devices” in the ‘view’ menu. | |
Now if you expand the section on COM ports, all the COM ports that have ever | |
been created will be displayed, the non present ones being in grey. You can | |
uninstall away anything that you don’t want (right click, select uninstall). |