Cvat: Add migration guide

Created on 18 Dec 2020  路  2Comments  路  Source: openvinotoolkit/cvat

My actions before raising this issue

Current Behavior

There is no migration guide and no information how to migrate CVAT data in installation/FAQ guide.

Possible Solution

Update FAQ.

Steps to Reproduce (for bugs)

N/A

Context

N/A

Your Environment

N/A

Next steps

N/A
Already asked in gitter but have not received an answer.

documentation

Most helpful comment

I think this is the way to do it but I am not sure if that is all the files required to migrate CVAT to another host

mkdir ~/backup
docker run --rm --name temp_backup --volumes-from cvat_db -v ~/backup:/backup ubuntu tar -cjvf /backup/cvat_db.tar.bz2 /var/lib/postgresql/data
docker run --rm --name temp_backup --volumes-from cvat -v ~/backup:/backup ubuntu tar -cjvf /backup/cvat_data.tar.bz2 /home/django/data

and to restore

docker run --rm --name temp_backup --volumes-from cvat_db -v ~/backup:/backup ubuntu bash -c "cd /var/lib/postgresql/data && tar -xvf /backup/cvat_db.tar.bz2 --strip 4"
docker run --rm --name temp_backup --volumes-from cvat -v ~/backup:/backup ubuntu bash -c "cd /home/django/data && tar -xvf /backup/cvat_db.tar.bz2 --strip 3"

All 2 comments

I think this is the way to do it but I am not sure if that is all the files required to migrate CVAT to another host

mkdir ~/backup
docker run --rm --name temp_backup --volumes-from cvat_db -v ~/backup:/backup ubuntu tar -cjvf /backup/cvat_db.tar.bz2 /var/lib/postgresql/data
docker run --rm --name temp_backup --volumes-from cvat -v ~/backup:/backup ubuntu tar -cjvf /backup/cvat_data.tar.bz2 /home/django/data

and to restore

docker run --rm --name temp_backup --volumes-from cvat_db -v ~/backup:/backup ubuntu bash -c "cd /var/lib/postgresql/data && tar -xvf /backup/cvat_db.tar.bz2 --strip 4"
docker run --rm --name temp_backup --volumes-from cvat -v ~/backup:/backup ubuntu bash -c "cd /home/django/data && tar -xvf /backup/cvat_db.tar.bz2 --strip 3"

@cstamatopoulos

Thanks for the solution!

But it seems there is a typo in your to restore command

/backup/cvat_db.tar.bz2 -> /backup/cvat_data.tar.bz2




and to restore

docker run --rm --name temp_backup --volumes-from cvat_db -v ~/backup:/backup ubuntu bash -c "cd /var/lib/postgresql/data && tar -xvf /backup/cvat_db.tar.bz2 --strip 4"
docker run --rm --name temp_backup --volumes-from cvat -v ~/backup:/backup ubuntu bash -c "cd /home/django/data && tar -xvf /backup/cvat_data.tar.bz2 --strip 3"
Was this page helpful?
0 / 5 - 0 ratings