P
P
partisan422021-04-07 17:48:30
PostgreSQL
partisan42, 2021-04-07 17:48:30

Why are backups not being restored?

Good day.
There was a problem, and I really ask for help.

Essence.
There is a server with CentOS 6, on the basis of which postgres is spinning.

[[email protected] ~]# psql -V
psql (PostgreSQL) 9.4.2

There are databases that are used as 1C databases.
This server has a sh script that is executed by cron. The essence of this script is to back up databases on the NAS. An example script is given below.
/usr/pgsql-9.4/bin/pg_dump --host localhost --port 5432 --username "postgres" --role "postgres" --no-password  --format custom --blobs --compress 9 --encoding UTF8 --verbose --file /mnt/NASbackup/Buh_UKEKNew/Buh_UKEKNew-$(date +%Y-%m-%d).backup "Buh_UKEKNew"  2> $LOG_FILE

And everything seems to be done normally, backups are being made, I'm calm, and one of them deployed a couple of months, and then I tried to do it again with the help of ...
pg_restore --host localhost --port 5432 --username "postgres" --dbname "Buh_sheregesh_31032021" --role "postgres" --no-password --clean  --section pre-data --section data --section post-data --verbose "/root/Buh_sheregesh3-2021-03-31.backup"

The database was originally created using the 1C console.
606dc4dbc0328954647390.png
And now, after restoring the backup, I get the following.
WARNING: errors ignored on restore: 23685
You have mail in /var/spool/mail/root

I also tried to restore other backups. The number of errors changes, but the essence remains the same.
I am getting the following.
606dc59f11e41489778376.png
And here is the full text.
Fatal
Error POST request to /e1cib/login resource failed:
due to:
Error performing infobase operation
DBMS error:
XX000: ERROR: There are 2 candidates for 'mchar_pattern_fixed_prefix' function'

due to:
DBMS error:
XX000: ERROR : There are 2 candidates for 'mchar_pattern_fixed_prefix' function'

Something tells me that this may be a typical beginner's mistake, but I still don't know which way to dig?

PS. I understand that both CentOS is old and PGSQL. But so far it has not been possible to stop the enterprise for more than 8 hours in order to reschedule everything, and no one has canceled the turnover :(

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
K
kav1984, 2021-04-27
@partisan42

I also stopped restoring backups.
1c 8.3 + Win serv 2008 + Postgres 9.6.7-1.1C Backups
were made with a script from the command line.
Previously, this sequence of actions worked. I created an empty Postgres database using 1s and restored it from the command line using pg_restore
But now, when restoring, errors began to appear and, as a result, like you did when entering 1s
XX000: ERROR: There are 2 candidates for 'mchar_pattern_fixed_prefix' function'
Everything worked with this sequence :
Created an empty database in PgAdmin3 1.22.2 with the template template0
And restored the database in PgAdmin itself. There were no mistakes.
Then I created a database with the same name in 1s and it all worked.

M
mkone112, 2021-04-08
@mkone112

Fortunately, I have little experience with 1s, but I can say for sure that you screwed up. Backup is done as follows - we remove the image (preferably everything and everything), and then we pretend that the server room has exploded, along with the building. After that - we are trying to restore, if it was not possible - then there was never a backup.

K
ky0, 2021-04-07
@ky0

Understand what each key in both of your commands means - in my opinion, even though I'm not familiar with the specifics of processed files for 1C postgres, about half of them are not needed.
Perhaps you should google some standard, generally recommended backup solutions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question