I have a problem I make a backup of the server where I had the bace data of the app which I believe in .sql
now try to restore the backup in the traditional way and won't let me!!
it says it has to be a format type .backup
use the command : psql -U usuario -d basededatos -p 5432 -h 192.168.0.111 < fichero.sql
also : psql -h localhost -d userstoreis -U admin -p 5432 -a -q -f /home/jobs/Desktop/resources/postgresql.sql
and don't do anything , not if you have to be in a specific folder for that to work the restore.
I also have the folder var/lib/postgresql/8.4/main/base where is stored the BD , could you move that folder to the new server, postgres and retrieve the BD , is that I cannot make another backup of the previous BD
Answer
Too many ads?
neollob
Points
129
According to the documentation of PostgreSQL, the console windows
uses a different encoding than your system, therefore when using 8-bit character jumps out a warning.
To change the encoding of the console you have to do the following:
cmd.exe /c chcp 65001
that codifia to utf-8
. If you need to use another code visit Windows Encoding Class
And change the font of the console to Lucida Console
I hope you serve, greetings