Archive a DatabaseΒΆ

ApertureDB uses the Persistent Memory Graph Database (PMGD) for storing metadata. PMGD uses mmap on a large virtual memory space but maps physical pages only when needed. However, the size on disk shown for the database by some utilities can be quite large. Similarly, copying a database can take a long time. So we use a different method of copying/archiving the ApertureDB database.

Assume a database called db at /home/user/aperturedb/:

sudo apt-get install bsdtar     # this is used for doing the sparse copy
cd /home/user/aperturedb/
bsdtar cvfz aperturedb_archive.tar.gz db
bsdtar -xzvSf aperturedb_archive.tar.gz

Tested on Ubuntu 16.04 and 18.04, more info here