cvat
cvat copied to clipboard
backup error
My actions before raising this issue
- [X] Read/searched the docs
- [x] Searched past issues
Issue
- I want to backup all data using How to backup all CVAT data, but some errors occured. How can I solve this issue?
❯ sudo docker run --rm --name temp_backup --volumes-from cvat_db -v $(pwd)/backup:/backup ubuntu tar -cjvf /backup/cvat_db.tar.bz2 /var/lib/postgresql/data
Unable to find image 'ubuntu:latest' locally
latest: Pulling from library/ubuntu
8527c5f86ecc: Pull complete
Digest: sha256:2a7dffab37165e8b4f206f61cfd984f8bb279843b070217f6ad310c9c31c9c7c
Status: Downloaded newer image for ubuntu:latest
tar: Removing leading `/' from member names
/var/lib/postgresql/data/
/bin/sh: 1: bzip2: not found
/var/lib/postgresql/data/pg_tblspc/
/var/lib/postgresql/data/postmaster.opts
/var/lib/postgresql/data/pg_twophase/
/var/lib/postgresql/data/pg_serial/
/var/lib/postgresql/data/postgresql.auto.conf
/var/lib/postgresql/data/base/
/var/lib/postgresql/data/base/16384/
/var/lib/postgresql/data/base/16384/12915
tar: /backup/cvat_db.tar.bz2: Cannot write: Broken pipe
tar: Child returned status 127
tar: Error is not recoverable: exiting now
❯ sudo docker run --rm --name temp_backup --volumes-from cvat -v $(pwd)/backup:/backup ubuntu tar -cjvf /backup/cvat_data.tar.bz2 /home/django/data
/home/django/data/
tar: Removing leading `/' from member names
/bin/sh: 1: bzip2: not found
/home/django/data/storages/
/home/django/data/models/
/home/django/data/projects/
/home/django/data/projects/4/
/home/django/data/projects/4/logs/
/home/django/data/projects/7/
/home/django/data/projects/7/logs/
/home/django/data/projects/7/logs/project.log
tar: /backup/cvat_data.tar.bz2: Cannot write: Broken pipe
tar: Child returned status 127
tar: Error is not recoverable: exiting now
Your Environment
- CVAT version: v1.6.0
- Operating System and version (e.g. Linux, Windows, MacOS): Ubuntu 18.04 / 20.04
What I have done
- Tested on three different servers
- Installed python package
apt install libbz2-devto resolvebzip2 not founderror
@hyunduk0206 , It is not a problem with backup. There are many problems which can lead to the error message. Just an example, https://unix.stackexchange.com/questions/369547/tar-broken-pipe-error
@nmanovic thank you for your answer. But I believe my case is quite typical case. I have tried the backup from three different servers, but all cases produced similar error message.
- The envirnment is Ubuntu 18.04/20.04 and it was set only for CVAT (i.e. clean environment).
- Although I changed some UI part from the original code, I didn't changed else.
Error message from another server:
$ sudo docker run --rm --name temp_backup --volumes-from cvat_db -v $(pwd)/backup:/backup ubuntu tar -cjvf /backup/cvat_db.tar.bz2 /var/lib/postgresql/data
Unable to find image 'ubuntu:latest' locally
latest: Pulling from library/ubuntu
8527c5f86ecc: Pull complete
Digest: sha256:2a7dffab37165e8b4f206f61cfd984f8bb279843b070217f6ad310c9c31c9c7c
Status: Downloaded newer image for ubuntu:latest
tar: Removing leading `/' from member names
/var/lib/postgresql/data/
/var/lib/postgresql/data/postmaster.opts
/bin/sh: 1: bzip2: not found
tar: /backup/cvat_db.tar.bz2: Cannot write: Broken pipe
tar: Child returned status 127
tar: Error is not recoverable: exiting now
/var/lib/postgresql/data/pg_stat/
/var/lib/postgresql/data/pg_stat/global.stat
/var/lib/postgresql/data/pg_stat/db_16384.stat
I'm facing the same issue. Is there any update?
docker run --rm --name temp_backup --volumes-from cvat_db -v $(pwd)/backup:/backup ubuntu:20.04 tar -cjvf /backup/cvat_db.tar.bz2 /var/lib/postgresql/data
I have the same issue, ubuntu 18.04
I have the same issue, ubuntu 18.04
Me too. The solution by @qin2294096 above worked for me, using "18.04" instead of "20.04" in the command.
me too! needed to use 18.04.. this should be updated! :) : https://cvat-ai.github.io/cvat/docs/administration/advanced/backup_guide/