Skip to content

Backup import uses 3 times the space as all the blobs #1724

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

Closed
link2xt opened this issue Jul 16, 2020 · 2 comments
Closed

Backup import uses 3 times the space as all the blobs #1724

link2xt opened this issue Jul 16, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@link2xt
Copy link
Collaborator

link2xt commented Jul 16, 2020

When backup is imported, backup is first copied, then blobs are copied to disk, and then VACUUM is executed to delete blobs table from the database. When VACUUM is executed, sqlite copies the database one more time.

A solution for this problem is to use a new backup format based on sqlar format, as proposed by @csb0730. In this format, messages database is stored as another blob/file in the archive, so after unpacking, there is no need to VACUUM it. Only the backup database/archive contains blobs.

See issues deltachat/deltachat-core#261 and #1640 for discussion.

Implementation for non-async core is in csb0730@a87ddf0

@hpk42
Copy link
Contributor

hpk42 commented Jul 16, 2020

Given storage and other considerations i suggest to close here and rather go for zip-files #1727 -- unless there are advantages of sqlar over zip files that i am missing.

@link2xt link2xt closed this as completed Jul 16, 2020
@csb0730
Copy link

csb0730 commented Jul 17, 2020

@hpk42 @link2xt @r10s
First I didn't noticed it, but later I recognized, that sqlar has the possibility to add more tables in file than only sqlar one. See the config table. I use it as in current backup_blobs archive to store some meta information about the backup.

Is this possible with zip too? Do we need it?

And maybe read the pros & cons for sqlar in documentation. Maybe there are some important facts?

What I can say about the story: At first I saw sqlar as a technical compromise but meanwhile I think it is a technical progress related to zip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants