Hi Paulos,
I'm not sure if I got it right. There are two scenarios:
1/ You do DUMP + RESTORE and information in restored tables is
different than in original table.
This would be weird. I can only imagine that DUMP failed or was
incomplete but otherwise there should be no issue
2/ You do DUMP + modification + RESTORE and modification is not in
restored tables.
This is also correct since modifications are not included in DUMP. I
suggest to make backup via DUMP after modification of those tables.
Regards,
Jaromir
On Thu, 2021-03-18 at 15:39 +0200, Dr Paulos Nyirenda wrote:
Good afternoon,
I am having trouble maintaing my English version of mail_template
table in the FRED
database backup and restore, can you help ?
I often need to backup the FRED registry system database and I am
using
#pg_dump -U fred fred > fred-backup-file.sql
To restore that database I use
#sudo -u postgres psql
#DROP DATABASE fred;
#CREATE DATABASE fred;
#\q
#psql -U fred -d fred -f fred-backup-file.sql
However, I find in almost all cases that I lose any updates that I
made on mail_template table
when I restore this way on the new restoration.
Is there a way that I can keep the most resent mail_template updates
between backup and
restore?
I have tried to save the mail_template using a dump like
#pg_dump -U fred fred -t mail_template > fred-mail_template-bkp.sql
but I am unable to restore this because I get the error that there
are too many dependencies
on mail_template when I try to drop the table and then use pg_restore
-t.
So, what is the best way of moving with my desired mail_template in
FRED?
Can I do this even between different schemas of backup and restore ?
Regards,
Paulos
=============================
Dr Paulos B Nyirenda
NIC.MW & .mw ccTLD
http://www.nic.mw
SDNP:
http://www.sdnp.org.mw
Tel: +265-(0)-882 089 166
Cell: +265-(0)-888-824787
WhatsApp: +265-(0)-887386433