Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backup error #4598

Closed
2 tasks done
comverser opened this issue Apr 28, 2022 · 7 comments · Fixed by #4812
Closed
2 tasks done

backup error #4598

comverser opened this issue Apr 28, 2022 · 7 comments · Fixed by #4812
Labels
bug Something isn't working

Comments

@comverser
Copy link

comverser commented Apr 28, 2022

My actions before raising this issue

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-dev to resolve bzip2 not found error
@nmanovic
Copy link
Contributor

@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

@comverser
Copy link
Author

comverser commented Apr 28, 2022

@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

@chanawee-jan
Copy link

I'm facing the same issue. Is there any update?

@qin2294096
Copy link

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

@GGDRriedel
Copy link

I have the same issue, ubuntu 18.04

@mallyagirish
Copy link

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.

@davodogster
Copy link

me too! needed to use 18.04.. this should be updated! :) : https://cvat-ai.github.io/cvat/docs/administration/advanced/backup_guide/

@azhavoro azhavoro mentioned this issue Aug 22, 2022
7 tasks
@nmanovic nmanovic added the bug Something isn't working label Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants