Hello,
I have restored an eGroupware backup vm vom August this year, because the current one got broken during a hypervisor crash (docker is not starting anymore).
I can successfully restore the groupware files and database but I have problems restoring the rocketchat database.
The original backup was created with this command:
docker exec -t rocketchat-mongo mongodump --db rocketchat --archive=- --gzip > /var/lib/egroupware/default/rocketchat/dump/dump_date "+%Y-%m-%d"
.gz
The restore with this command fails:
cat /var/lib/egroupware/default/rocketchat/dump/dump_2024-11-07.gz | docker exec -i rocketchat-mongo mongorestore --db rocketchat --archive --gzip
2024-11-15T16:37:27.732+0000 The --db and --collection flags are deprecated for this use-case; please use --nsInclude instead, i.e. with --nsInclude=${DATABASE}.${COLLECTION}
2024-11-15T16:37:27.733+0000 Failed: stream or file does not appear to be a mongodump archive
2024-11-15T16:37:27.733+0000 0 document(s) restored successfully. 0 document(s) failed to restore.
read unix @->/var/run/docker.sock: read: connection reset by peer
I understand that the db parameter has to be replaced by nsInclude seemingly because of a newer mongorestore-version:
cat /var/lib/egroupware/default/rocketchat/dump/dump_2024-11-07.gz | docker exec -i rocketchat-mongo mongorestore --nsInclude=rocketchat --archive --gzip
2024-11-15T16:34:37.931+0000 Failed: stream or file does not appear to be a mongodump archive
2024-11-15T16:34:37.931+0000 0 document(s) restored successfully. 0 document(s) failed to restore.
read unix @->/var/run/docker.sock: read: connection reset by peer
The gz-dump-file can not be unzipped with gunzip, I have tried on different systems and different unzip programs:
gunzip dump_2024-11-07.gz
gzip: dump_2024-11-07.gz: invalid compressed data–format violated
I do not understand why the backup dump-gz-file seems to be corrupted.
Is there a way to extract the rocketchat database from a system where docker is no longer starting?
Any help is appreciated.
Sincerely,
Friedemann