-
Notifications
You must be signed in to change notification settings - Fork 81
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
zbackup gc keeps adding 2x file size? #70
Comments
I am also seeing this issue. Every GC doubles the index file size, so having a periodic gc to clear out old backups causes excessive growth in repository size, making zbackup unfeasible to use for backups. This is with zbackup 1.4.1 from the Ubuntu .deb files. |
Using the current version checked out from GIT rather than the Ubuntu release 1.4.1 seems to fix it - though I had to also apply the patch at #72 - more info as my ongoing backups accumulate. index size |
More repeatable example, with script:
I get result size file:
|
I think I have a crude fix - I say crude as I did this without any deep understanding of the code, but setting indexModified to true when doing gc so that the index is rewritten rather than added to when doing gc() seems to fix it: e.g. edit: only works in some cases, still debugging. |
zbackup#72 zbackup#70 so this build of zbackup is usable.
This change seems to sort out this problem, at least for my usage case of zbackup: |
zbackup#72 zbackup#70 so this build of zbackup is usable.
Reindexing feauture coming soon
[root@hw1 zbackup]# ls -lh index
total 216M
-rw------- 1 root root 132K Apr 11 02:58 50f87e1dad04b9dff1b153b08d79b6b548cce18c24019d90
-rw------- 1 root root 216M Apr 10 08:35 878f27901bf28cad4ecae1e1d58190fe4118548b972d7607
FIRST GC adds 216M index
[root@hw1 zbackup]# zbackup gc --non-encrypted $PWD
Loading index...
Loading index file 878f27901bf28cad4ecae1e1d58190fe4118548b972d7607...
Loading index file 50f87e1dad04b9dff1b153b08d79b6b548cce18c24019d90...
Index loaded.
Using up to 40 MB of RAM as cache
Using up to 16 thread(s) for compression
Checking used chunks...
Checking backup 003...
Checking backup 001...
Checking backup 002...
Checking backup 004...
Checking backup 005...
Checking bundles...
Loading index...
Loading index file 878f27901bf28cad4ecae1e1d58190fe4118548b972d7607...
Loading index file 50f87e1dad04b9dff1b153b08d79b6b548cce18c24019d90...
Index loaded.
Cleaning up...
Garbage collection complete
[root@hw1 zbackup]# ls -lh index
total 432M
-rw------- 1 root root 132K Apr 11 02:58 50f87e1dad04b9dff1b153b08d79b6b548cce18c24019d90
-rw------- 1 root root 216M Apr 10 08:35 878f27901bf28cad4ecae1e1d58190fe4118548b972d7607
-rw------- 1 root root 216M Apr 11 05:18 fa996559bbf6d44bc671908c42a3a2e1c21096e4d1c115c1
SECOND GC adds 432M index
[root@hw1 zbackup]# zbackup gc --non-encrypted $PWD
Loading index...
Loading index file fa996559bbf6d44bc671908c42a3a2e1c21096e4d1c115c1...
Loading index file 878f27901bf28cad4ecae1e1d58190fe4118548b972d7607...
Loading index file 50f87e1dad04b9dff1b153b08d79b6b548cce18c24019d90...
Index loaded.
Using up to 40 MB of RAM as cache
Using up to 16 thread(s) for compression
Checking used chunks...
Checking backup 003...
Checking backup 001...
Checking backup 002...
Checking backup 004...
Checking backup 005...
Checking bundles...
Loading index...
Loading index file fa996559bbf6d44bc671908c42a3a2e1c21096e4d1c115c1...
Loading index file 878f27901bf28cad4ecae1e1d58190fe4118548b972d7607...
Loading index file 50f87e1dad04b9dff1b153b08d79b6b548cce18c24019d90...
Index loaded.
Cleaning up...
Garbage collection complete
[root@hw1 zbackup]# ls -lh index
total 863M
-rw------- 1 root root 432M Apr 11 05:19 41f8614034da0cfaf76766ef28f590e1dc9521b3383d656b
-rw------- 1 root root 132K Apr 11 02:58 50f87e1dad04b9dff1b153b08d79b6b548cce18c24019d90
-rw------- 1 root root 216M Apr 10 08:35 878f27901bf28cad4ecae1e1d58190fe4118548b972d7607
-rw------- 1 root root 216M Apr 11 05:18 fa996559bbf6d44bc671908c42a3a2e1c21096e4d1c115c1
Every new gc run will add a new file 2x size of prev one.
The text was updated successfully, but these errors were encountered: