Restore DJIGZo Backup to Ciphermail

We are moving from the DJIGZO appliance to the Ciphermail download instead of the appliance. We used sudo /usr/share/djigzo/scripts/backup.sh -b > backup.tar to backup DJIGZO. But could not restore in Ciphermail using the menus. We found a script in Cipermail that looks like it restores backups but got a lot of errors. ./backup.sh -r -f /home/h2root/backup.tar -t postgres

It appears the data is in Ciphermail. Some of the errors are:

gzip: /home/h2root/backup.tar: not in gzip format
tar: /etc/postfix/client-blacklist: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/postfix/client-blacklist.db: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/postfix/client-whitelist: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/postfix/client-whitelist.db: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/postfix/virtual-aliases: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/postfix/virtual-aliases.db: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/postfix/header-checks: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/postfix/transports: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/postfix/transports.db: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/aliases: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/aliases.db: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /usr/share/djigzo/resources/fonts/*.ttf: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/djigzo/ip-filter.properties: Not found in archive
tar: Exiting with failure status due to previous errors
ERROR: constraint "fk31eb4613a92db044" of relation "admin_authority" does not exist
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP SEQUENCE
SET
SET
SET
SET
SET
SET
SET
SET
SET
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
setval

image001.png

···

--------
  37524
(1 row)

CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
COPY 2
COPY 4
COPY 14
COPY 1
COPY 0
COPY 1385
COPY 1215
COPY 59
COPY 26
COPY 52
COPY 125
COPY 0
COPY 0
COPY 1
COPY 0
COPY 133
COPY 126
COPY 0
COPY 133
COPY 0
COPY 254
COPY 0
COPY 0
COPY 122
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
REVOKE
REVOKE
GRANT
GRANT
ERROR: relation "admin" already exists
ERROR: relation "admin_authority" already exists
ERROR: relation "authority" already exists
ERROR: relation "blob" already exists
ERROR: relation "certificaterequest" already exists
ERROR: relation "certificates" already exists
ERROR: relation "certificates_email" already exists
ERROR: relation "crls" already exists
ERROR: relation "ctl" already exists
ERROR: relation "ctl_namevalues" already exists
CREATE TABLE
CREATE TABLE
CREATE TABLE
ERROR: relation "keystore" already exists
ERROR: relation "mail_repository" already exists
ERROR: relation "mail_repository_recipients" already exists
ERROR: relation "named_blob" already exists
ERROR: relation "named_blob_named_blob" already exists
CREATE TABLE
CREATE TABLE
ERROR: relation "properties" already exists
ERROR: relation "properties_namevalues" already exists
ERROR: relation "sms" already exists
ERROR: relation "userpreferences" already exists
ERROR: relation "userpreferences_certificates" already exists
ERROR: relation "userpreferences_inheritedpreferences" already exists
ERROR: relation "userpreferences_named_blob" already exists
ERROR: relation "userpreferences_named_certificates" already exists
ERROR: relation "users" already exists
ERROR: constraint "fk31eb4613a92db044" for relation "admin_authority" already exists
ERROR: constraint "fk31eb46135dd88a6" for relation "admin_authority" already exists
ERROR: relation "certificaterequest_email_index" already exists
ERROR: relation "certificaterequest_next_update_index" already exists
ERROR: relation "certificaterequest_created_index" already exists
ERROR: relation "certificates_issuer_index" already exists
ERROR: relation "certificates_key_alias_index" already exists
ERROR: relation "certificates_thumbprint_index" already exists
ERROR: relation "certificates_creationdate_index" already exists
ERROR: relation "certificates_subject_index" already exists
ERROR: relation "certificates_store_name_index" already exists
ERROR: relation "certificates_subject_key_id_index" already exists
ERROR: relation "certificates_serial_index" already exists
ERROR: constraint "fk904263596f91dc04" for relation "certificates_email" already exists
ERROR: relation "crls_thumbprint_index" already exists
ERROR: relation "crls_issuer_index" already exists
ERROR: relation "crls_crlnumber_index" already exists
ERROR: relation "crls_store_name_index" already exists
ERROR: constraint "fkc370b4312c4f7350" for relation "ctl_namevalues" already exists
ALTER TABLE
ALTER TABLE
ALTER TABLE
ERROR: relation "keystore_alias_index" already exists
ERROR: relation "keystore_storename_index" already exists
ERROR: constraint "fk9f4a42d2a7662f3" for relation "mail_repository" already exists
ERROR: constraint "fk16fd4d076bba8de5" for relation "mail_repository_recipients" already exists
ERROR: constraint "fkef3face33f4fe1e7" for relation "named_blob" already exists
ERROR: constraint "fkc12079bf50dff003" for relation "named_blob_named_blob" already exists
ERROR: constraint "fkc12079bf9df0d9c9" for relation "named_blob_named_blob" already exists
ALTER TABLE
ERROR: constraint "fk1de74a19d9423b4c" for relation "properties_namevalues" already exists
ERROR: relation "sms_datelasttry_index" already exists
ERROR: relation "userpreferences_name_index" already exists
ERROR: relation "userpreferences_category_index" already exists
ERROR: constraint "fk8551364dfe700867" for relation "userpreferences" already exists
ERROR: constraint "fk8551364d3f326a0d" for relation "userpreferences" already exists
ERROR: constraint "fkb8b48a6e4e408931" for relation "userpreferences_certificates" already exists
ERROR: constraint "fkb8b48a6e6f91dc04" for relation "userpreferences_certificates" already exists
ERROR: constraint "fk46abee904e408931" for relation "userpreferences_inheritedpreferences" already exists
ERROR: constraint "fk46abee90f11d70ab" for relation "userpreferences_inheritedpreferences" already exists
ERROR: constraint "fka77dca154e408931" for relation "userpreferences_named_blob" already exists
ERROR: constraint "fka77dca159df0d9c9" for relation "userpreferences_named_blob" already exists
ERROR: constraint "fkaab29434a3567c25" for relation "userpreferences_named_certificates" already exists
ERROR: constraint "fkaab294344e408931" for relation "userpreferences_named_certificates" already exists
ERROR: constraint "fk6a68e08ba1f7c2e" for relation "users" already exists
ERROR: relation "hibernate_sequence" already exists
ERROR: relation "certificates_email_email_index" already exists

Can you direct us as to if the above was successful or if there is a better process?
[cid:image001.png(a)01D2B522.7C8C7120]<Business & Corporate Lawyers | Howard & Howard;
NOTICE: Information contained in this transmission to the named addressee is proprietary information and is subject to attorney-client privilege and work product confidentiality. If the recipient of this transmission is not the named addressee, the recipient should immediately notify the sender and destroy the information transmitted without making any copy or distribution thereof.

ELECTRONIC SIGNATURE: Nothing contained in this communication is intended to constitute an electronic signature unless a specific statement to the contrary is included in this message.

Hi,

Most error/warning are just warning messages and can be ignored. For
example "/etc/postfix/client-blacklist: Not found in archive" is only a
warning that this file is not available in the backup tar.

The "relation "keystore" already exists" and other similar error
messages are given because the tables/relations etc. already exist. The
reason the DB creation script is run after import is to make sure that
any database changes required by the new system are applied (the
imported backup might not contain certain tables because the import if
from an older version).

The only error message which is unexpected is the first error:

ERROR: constraint "fk31eb4613a92db044" of relation "admin_authority"
does not exist

not sure why that constraint did not exist (perhaps it was deleted in
the previous import attempt?). However since the error is from the drop
tables script and the constraint was added during import I think you can
safely ignore this error.

Kind regards,

Martijn Brinkers

···

On 04/14/2017 07:30 PM, Heater, B. Roger wrote:

We are moving from the DJIGZO appliance to the Ciphermail download instead of the appliance. We used sudo /usr/share/djigzo/scripts/backup.sh -b > backup.tar to backup DJIGZO. But could not restore in Ciphermail using the menus. We found a script in Cipermail that looks like it restores backups but got a lot of errors. ./backup.sh -r -f /home/h2root/backup.tar -t postgres

It appears the data is in Ciphermail. Some of the errors are:

gzip: /home/h2root/backup.tar: not in gzip format
tar: /etc/postfix/client-blacklist: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/postfix/client-blacklist.db: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/postfix/client-whitelist: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/postfix/client-whitelist.db: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/postfix/virtual-aliases: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/postfix/virtual-aliases.db: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/postfix/header-checks: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/postfix/transports: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/postfix/transports.db: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/aliases: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/aliases.db: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /usr/share/djigzo/resources/fonts/*.ttf: Not found in archive
tar: Exiting with failure status due to previous errors
tar: /etc/djigzo/ip-filter.properties: Not found in archive
tar: Exiting with failure status due to previous errors
ERROR: constraint "fk31eb4613a92db044" of relation "admin_authority" does not exist
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP TABLE
DROP SEQUENCE
SET
SET
SET
SET
SET
SET
SET
SET
SET
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE SEQUENCE
ALTER TABLE
setval
--------
  37524
(1 row)

CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
COPY 2
COPY 4
COPY 14
COPY 1
COPY 0
COPY 1385
COPY 1215
COPY 59
COPY 26
COPY 52
COPY 125
COPY 0
COPY 0
COPY 1
COPY 0
COPY 133
COPY 126
COPY 0
COPY 133
COPY 0
COPY 254
COPY 0
COPY 0
COPY 122
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
REVOKE
REVOKE
GRANT
GRANT
ERROR: relation "admin" already exists
ERROR: relation "admin_authority" already exists
ERROR: relation "authority" already exists
ERROR: relation "blob" already exists
ERROR: relation "certificaterequest" already exists
ERROR: relation "certificates" already exists
ERROR: relation "certificates_email" already exists
ERROR: relation "crls" already exists
ERROR: relation "ctl" already exists
ERROR: relation "ctl_namevalues" already exists
CREATE TABLE
CREATE TABLE
CREATE TABLE
ERROR: relation "keystore" already exists
ERROR: relation "mail_repository" already exists
ERROR: relation "mail_repository_recipients" already exists
ERROR: relation "named_blob" already exists
ERROR: relation "named_blob_named_blob" already exists
CREATE TABLE
CREATE TABLE
ERROR: relation "properties" already exists
ERROR: relation "properties_namevalues" already exists
ERROR: relation "sms" already exists
ERROR: relation "userpreferences" already exists
ERROR: relation "userpreferences_certificates" already exists
ERROR: relation "userpreferences_inheritedpreferences" already exists
ERROR: relation "userpreferences_named_blob" already exists
ERROR: relation "userpreferences_named_certificates" already exists
ERROR: relation "users" already exists
ERROR: constraint "fk31eb4613a92db044" for relation "admin_authority" already exists
ERROR: constraint "fk31eb46135dd88a6" for relation "admin_authority" already exists
ERROR: relation "certificaterequest_email_index" already exists
ERROR: relation "certificaterequest_next_update_index" already exists
ERROR: relation "certificaterequest_created_index" already exists
ERROR: relation "certificates_issuer_index" already exists
ERROR: relation "certificates_key_alias_index" already exists
ERROR: relation "certificates_thumbprint_index" already exists
ERROR: relation "certificates_creationdate_index" already exists
ERROR: relation "certificates_subject_index" already exists
ERROR: relation "certificates_store_name_index" already exists
ERROR: relation "certificates_subject_key_id_index" already exists
ERROR: relation "certificates_serial_index" already exists
ERROR: constraint "fk904263596f91dc04" for relation "certificates_email" already exists
ERROR: relation "crls_thumbprint_index" already exists
ERROR: relation "crls_issuer_index" already exists
ERROR: relation "crls_crlnumber_index" already exists
ERROR: relation "crls_store_name_index" already exists
ERROR: constraint "fkc370b4312c4f7350" for relation "ctl_namevalues" already exists
ALTER TABLE
ALTER TABLE
ALTER TABLE
ERROR: relation "keystore_alias_index" already exists
ERROR: relation "keystore_storename_index" already exists
ERROR: constraint "fk9f4a42d2a7662f3" for relation "mail_repository" already exists
ERROR: constraint "fk16fd4d076bba8de5" for relation "mail_repository_recipients" already exists
ERROR: constraint "fkef3face33f4fe1e7" for relation "named_blob" already exists
ERROR: constraint "fkc12079bf50dff003" for relation "named_blob_named_blob" already exists
ERROR: constraint "fkc12079bf9df0d9c9" for relation "named_blob_named_blob" already exists
ALTER TABLE
ERROR: constraint "fk1de74a19d9423b4c" for relation "properties_namevalues" already exists
ERROR: relation "sms_datelasttry_index" already exists
ERROR: relation "userpreferences_name_index" already exists
ERROR: relation "userpreferences_category_index" already exists
ERROR: constraint "fk8551364dfe700867" for relation "userpreferences" already exists
ERROR: constraint "fk8551364d3f326a0d" for relation "userpreferences" already exists
ERROR: constraint "fkb8b48a6e4e408931" for relation "userpreferences_certificates" already exists
ERROR: constraint "fkb8b48a6e6f91dc04" for relation "userpreferences_certificates" already exists
ERROR: constraint "fk46abee904e408931" for relation "userpreferences_inheritedpreferences" already exists
ERROR: constraint "fk46abee90f11d70ab" for relation "userpreferences_inheritedpreferences" already exists
ERROR: constraint "fka77dca154e408931" for relation "userpreferences_named_blob" already exists
ERROR: constraint "fka77dca159df0d9c9" for relation "userpreferences_named_blob" already exists
ERROR: constraint "fkaab29434a3567c25" for relation "userpreferences_named_certificates" already exists
ERROR: constraint "fkaab294344e408931" for relation "userpreferences_named_certificates" already exists
ERROR: constraint "fk6a68e08ba1f7c2e" for relation "users" already exists
ERROR: relation "hibernate_sequence" already exists
ERROR: relation "certificates_email_email_index" already exists

Can you direct us as to if the above was successful or if there is a better process?
[cid:image001.png(a)01D2B522.7C8C7120]<Business & Corporate Lawyers | Howard & Howard;
NOTICE: Information contained in this transmission to the named addressee is proprietary information and is subject to attorney-client privilege and work product confidentiality. If the recipient of this transmission is not the named addressee, the recipient should immediately notify the sender and destroy the information transmitted without making any copy or distribution thereof.

ELECTRONIC SIGNATURE: Nothing contained in this communication is intended to constitute an electronic signature unless a specific statement to the contrary is included in this message.

_______________________________________________
Users mailing list
Users(a)lists.djigzo.com
https://lists.djigzo.com/lists/listinfo/users

--
CipherMail email encryption

Email encryption with support for S/MIME, OpenPGP, PDF encryption and
secure webmail pull.

Twitter: http://twitter.com/CipherMail