0 votes

Backup of server BD postgres

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

introducir la descripción de la imagen aquí

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 < 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.

introducir la descripción de la imagen aquí

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


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


HolaDevs is an online community of programmers and software lovers.
You can check other people responses or create a new question if you don't find a solution

Powered by: