# Reduce dblock-size possible?

**URL:** https://forum.duplicati.com/t/reduce-dblock-size-possible/5335
**Category:** Support
**Created:** [November 19, 2018, 11:28am UTC](https://forum.duplicati.com/t/reduce-dblock-size-possible/5335 "2018-11-19T11:28:10Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![thommyX](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/e47774/32.png) [@thommyX](https://forum.duplicati.com/u/thommyX)
#### Post date: [November 19, 2018, 11:28am UTC](https://forum.duplicati.com/t/reduce-dblock-size-possible/5335/1 "2018-11-19T11:28:11Z")

</div>

I have an existing backup with about 40GB and the dblock-files are 750MB.

If there a possibility to “convert” the existing backup with 750MB files to a backup with file sizes of 100MB?

Just changing the --dblock-size will only work for new files but not for the existing ones.

Background for the question: I have to change the “cloud server” and the new one has very limited download speed (limited upload asynchron dsl of the server) and so a block-size of 100MB would be better. With the existing 750MB files the verification takes a very long time. I would prefer to keep the --backup-test-samples=X, just with smaller files.

Conversion can be done locally. At the moment I have the whole backup on a local USB-storage and this storage is then tranported to the server (house of a friend).

---

<div class="post-metadata">

### Author: ![kees-z](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kees-z/32/29_2.png) [@kees-z](https://forum.duplicati.com/u/kees-z)
#### Post date: [November 19, 2018, 12:39pm UTC](https://forum.duplicati.com/t/reduce-dblock-size-possible/5335/2 "2018-11-19T12:39:36Z")

</div>

However it should be technically possible, I can’t find a tool to do this (semi) automatically.  
I was hoping that the `recompress` command of the `Duplicati.CommandLine.RecoveryTool.exe` would accept the `--dblock-size` option, but this option seems to be ignored.

It would indeed be a useful feature to be able to change the upload volume size.

---

<div class="post-metadata">

### Author: ![JonMikelV](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@JonMikelV](https://forum.duplicati.com/u/JonMikelV)
#### Post date: [November 19, 2018, 4:18pm UTC](https://forum.duplicati.com/t/reduce-dblock-size-possible/5335/3 "2018-11-19T16:18:35Z")

</div>

Recovery tool does sound like the right thing to use:

> [@How to switch from 7z to zip in already existing backup scenario?](https://forum.duplicati.com/t/how-to-switch-from-7z-to-zip-in-already-existing-backup-scenario/611/11):
>
> Isn’t that what the RecoveryTool’s recompress option does?

* * *

Alternatively, this might do the trick (ignore the “change compresssion settings” comments) :

> [@How to switch from 7z to zip in already existing backup scenario?](https://forum.duplicati.com/t/how-to-switch-from-7z-to-zip-in-already-existing-backup-scenario/611/10):
>
> If one REALLY wanted to change compression settings (such as 7z vs zip) of existing files, would it work to fiddle --small-file-size, --small-file-max-count and possibly --threshold such that every file would be considered small so would be downloaded, re-compressed with the new settings, then re-uploaded?

---

<div class="post-metadata">

### Author: ![kees-z](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kees-z/32/29_2.png) [@kees-z](https://forum.duplicati.com/u/kees-z)
#### Post date: [November 19, 2018, 4:32pm UTC](https://forum.duplicati.com/t/reduce-dblock-size-possible/5335/4 "2018-11-19T16:32:21Z")

</div>

The `recompress` command in the Recovery Tool doesn’t seem to support resizing of archives, I guess the only thing it can do is switch from 7z to zip and vice versa. However, resizing arcihves would be a nice extra functionality for the `recompress` command.

The `--small-file-size` and `--small-file-max-count` options are a nice trick to consolidate smaller archives to a single larger one, but the OP wants to do the opposite: split a large archive to smaller archives.

---

<div class="post-metadata">

### Author: ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)
#### Post date: [November 19, 2018, 5:00pm UTC](https://forum.duplicati.com/t/reduce-dblock-size-possible/5335/5 "2018-11-19T17:00:15Z")

</div>

[Trigger rewrite of all remote volumes after –dblock-size change](https://forum.duplicati.com/t/trigger-rewrite-of-all-remote-volumes-after-dblock-size-change/5167) sounds similar. You could ask how it turned out, using [–threshold](https://duplicati.readthedocs.io/en/latest/06-advanced-options/#threshold)=0. Whether or not that worked well, --threshold is a setting you can try to get your conversion.

[Compacting files at the backend](https://duplicati.readthedocs.io/en/latest/03-using-the-graphical-user-interface/#compacting-files-at-the-backend)  
[The COMPACT command](https://duplicati.readthedocs.io/en/latest/04-using-duplicati-from-the-command-line/#the-compact-command)  
[Compact - Limited / Partial](https://forum.duplicati.com/t/compact-limited-partial/3543)

---

<div class="post-metadata">

### Author: ![JonMikelV](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@JonMikelV](https://forum.duplicati.com/u/JonMikelV)
#### Post date: [November 19, 2018, 7:56pm UTC](https://forum.duplicati.com/t/reduce-dblock-size-possible/5335/6 "2018-11-19T19:56:52Z")

</div>

I tested the `COMPACT` process on a copy of a job and it seems to have done the trick - eventually. Feel free to test yourself, or assume my results are valid and apply to your live backup (YMMV).

* * *

## My test process…

I made a copy of an existing job by:

- copy backend files to new folder
- export job as file
- import job from file
- edit name so unique
- edit dest. to point to copy
- disable schedule

I then ran the following against it by:

- Go to job menu -\> Commandline
- select “Command” `Compact`
- leave “Target URL \>” alone
- Remove all Commandline arguments
- Use “Edit as text” for “Advanced options” and replace EVERYTHING with this:

```
--small-file-max-count=0
--small-file-size=0b
--threshold=0
--compression-module=zip
--send-mail-any-operation=false
--dbpath=/data/Duplicati/CTRKXBLMSD-TEST.sqlite
--encryption-module=aes
--dblock-size=40MB
--retention-policy=7D:U,1M:1D,1Y:1W,U:1M
--passphrase=xxxxx

```

It seems to have happily re-compressed 30% of the files from the default 50MB dblock size to the reqiested 40MB on the first run then stopped w/out error. I ran the process again, and it processed the rest of the files to the new 40MB dblock size.

Why it took two runs I don’t know.

I have a full-verification test running now just to make sure everything is good as this also seems to have converted my very old .7z dblock files to .zip (yay!).

Note that the progress bar just said “Running task: Starting backup …” the whole time, so estimating how long it will take is tricky. 🙂

For those that care, here are the first & last few lines of the PROFILING console log:

```
The operation Compact has started
Starting - Running Compact
Found 0 fully deletable volume(s)
Found 0 small volumes(s) with a total size of 0 bytes
Found 93 volume(s) with a total of 0.00% wasted space (0 bytes of 4.08 GB)
Compacting because there is 0.00% wasted space and the limit is 0%
Starting - RemoteOperationList
Backend event: List - Started: ()
  Listing remote folder ...
Backend event: List - Completed: (276 bytes)
RemoteOperationList took 0:00:00:00.035
...
Starting - CommitCompact
CommitCompact took 0:00:00:00.262
Running Compact took 0:00:28:07.987
Return code: 0

```

---

<div class="post-metadata">

### Author: ![kees-z](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kees-z/32/29_2.png) [@kees-z](https://forum.duplicati.com/u/kees-z)
#### Post date: [November 19, 2018, 8:50pm UTC](https://forum.duplicati.com/t/reduce-dblock-size-possible/5335/7 "2018-11-19T20:50:31Z")

</div>

Nice hack of the `compact` command!  
I guess is has never been the intention to use this command for resizing remote volumes, but it looks like this is more convenient to use than downloading everything to local storage, converting and re-uploading with the Recovery tool.

---

<div class="post-metadata">

### Author: ![thommyX](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/e47774/32.png) [@thommyX](https://forum.duplicati.com/u/thommyX)
#### Post date: [November 26, 2018, 8:52am UTC](https://forum.duplicati.com/t/reduce-dblock-size-possible/5335/8 "2018-11-26T08:52:48Z")

</div>

This statement did the job for me. I didn’t need 2 executions like JonMikelV? First rund did the job!

Thanks a lot.

```
"c:\Program Files\Duplicati 2\Duplicati.CommandLine.exe"
compact
file://x:\FOLDER
--backup-name=Test
--dbpath=c:\temp\dbfile.sqlite
--passphrase=xxxxxxx
--disable-module=console-password-input
--encryption-module=aes
--compression-module=zip
--dblock-size=xxxMB
--small-file-max-count=0
--small-file-size=0b
--threshold=0
--send-mail-any-operation=false
```

---

<div class="post-metadata">

### Author: ![JonMikelV](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@JonMikelV](https://forum.duplicati.com/u/JonMikelV)
#### Post date: [November 26, 2018, 8:39pm UTC](https://forum.duplicati.com/t/reduce-dblock-size-possible/5335/9 "2018-11-26T20:39:55Z")

</div>

Glad it worked for you! 😃

Do you think this was a simple enough process to be considered a “solution”?

* * *

Because I’m a glutton for punishment, I wiped my first test and repeated it - this time it handled everything in a single run, so I’m guessing something interrupted my first test.
