T
T
taaadm2015-01-23 08:51:00
PostgreSQL
taaadm, 2015-01-23 08:51:00

How to restore a database dump for 1C postgresql 8.4?

Installed server 1C 8.2 + postgresql 8.4.3-3.1C (during installation I chose UTF-8 encoding) on ​​Win7x64.
Set up a database backup via pg_dump daily. Having tried to restore the database from these dumps, I ran into a problem - the database was restored but with a bunch of errors and did not start.
Having opened the dump itself through a notepad, I saw that part of the text in it was in the form of "krakozyabr". It is clear that until I figure out the encoding, I will not be able to restore from backups.
How to back up the database in this case?
Is it possible to salvage existing backups?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
T
taaadm, 2015-01-23
@taaadm

Dam was done with the command:
pg_dump.exe -i -h localhost -p 5432 -U postgres -w -F c -f "E:\BackUp.back" test1
I also tried to specify the dump encoding with the parameter -E Windows1251 and UTF-8.
Restored through pg_admin - it was restored, but at the end there was a message with the following content: WARNING: 380 errors were detected.
I tried to restore it like this:
pg_restore -Upostgres -d "test1" -w -F c -v "E:\BackUp.back"
Recovered, with a full check using 1C, the database crashes. I unload the file into dt - it weighs 3 times less than the original base.
Recovery via
psql -Upostgres -W -d test1 -f "E:\BackUp.back"
gave similar results. During recovery there were errors "..
I copied the dump to linux mint and opened it with Kate. Tried to open both in UTF-8 and Windows 1251 and KOI8-ru

K
krypt3r, 2015-01-23
@krypt3r

Usually they provide more data: in what format the dump is, what command was restored, the text of errors, etc.
Of course, you did not forget to tell Notepad that you have a file in UTF-8?
PS. Connect libtelepathist.so to postgres =)
ZZY. That is libtelepathist.dll ))

K
kalapanga, 2015-01-23
@kalapanga

If the base is not working around the clock, i.e. there is a time when it is possible to provide exclusive access to the database, then I would backup it using the means of 1C itself and not take a steam bath.

S
Salavat Sharapov, 2015-01-26
@desperadik

Let's go in order.
On the combat server (As I understand the Windows family), run cmd.exe as administrator.
Next, we make a backup on the "hot", for this we go to the bin folder of postgresql, there we run pg_dump.exe
i.e.
We will backup to tar.
Is the schema owner exactly postgres?
After, you can on the test database server, you can on the same combat one. It all depends on your carelessness =).
The documentation says that to restore the database from a backup, you need to stop the database server process.
Next_
Create a new database named "DBNAME_NEW" - for example.
After_
pg_restore.exe --username "postgres" --dbname "DBNAME_NEW" --file "E:\BackUp.back" Let's
try, talk about errors.

S
SofroN, 2017-08-01
@SofroN

As for me, keenetic for home is an awesome thing, you just need to choose a model with normal support. The latest firmware supports a lot of things.
Just at home, keenetic II with firmware 2.09, can torrent, you can connect a dect phone, either soon or already supports dvb-t2 usb sticks (you can make your own ip tv), vpn as a client and server, you can even install opkg packages, supports without problems printers disks and much more.
The only thing I'm missing is a more advanced firewall
https://forum.keenetic.net/announcement/5-where-taken...

V
Vladimir Zhurkin, 2017-08-01
@icCE

Well, as for me, very successful Mikrotik. Hap AC will cover your tasks completely.
The only point is that torrents open a lot of connections and load the CPU. But this is true for any router.
You can raise ipv6 through the tunnel, you can turn it on wifi or a separate VPN connector so that you don’t raise VPN on devices or where it’s impossible to raise (TV BOX, Apple TV, etc.).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question