Skip to content

Commit 45fc6e3

Browse files
authored
Add examples on how to calculate the download size of an update (#275)
Signed-off-by: Ludovico de Nittis <[email protected]>
1 parent 0260be9 commit 45fc6e3

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ cd desync/cmd/desync && go install
103103
- `make` - split a blob into chunks and create an index file
104104
- `mount-index` - FUSE mount a blob index. Will make the blob available as single file inside the mountpoint.
105105
- `info` - Show information about an index file, such as number of chunks and optionally chunks from an index that a re present in a store
106+
- `inspect-chunks` - Show detailed information about chunks stored in an index file
106107
- `mtree` - Print the content of an archive or index in mtree-compatible format.
107108

108109
### Options (not all apply to all commands)
@@ -628,6 +629,39 @@ desync chunk-server -s /path/to/store --key server.key --cert server.crt --mutua
628629
desync extract --client-key client.key --client-cert client.crt --ca-cert ca.crt -s https://hostname:8443/ image.iso.caibx image.iso
629630
```
630631

632+
Get the size of the chunks that are required for an update, when using *compressed* chunks (default).
633+
I.e. how much data a client needs to download.
634+
635+
```text
636+
# Server
637+
## Create the update index file
638+
desync make --store /some/local/store update.caibx /some/blob
639+
640+
## Create a detailed JSON info file for the chunks
641+
desync inspect-chunks --store /some/local/store update.caibx update_chunks_details.json
642+
643+
# Client
644+
## Download the update_chunks_details.json file
645+
## Get the update info
646+
desync info --seed local_index.caibx --chunks-info update_chunks_details.json --format=json update.caibx
647+
648+
## The value in 'dedup-size-not-in-seed-nor-cache-compressed' will hold the size in bytes that needs to be downloaded
649+
```
650+
651+
Get the size of the chunks that are required for an update, when using *uncompressed* chunks.
652+
653+
```text
654+
# Server
655+
## Create the update index file
656+
desync make --store /some/local/store update.caibx /some/blob
657+
658+
# Client
659+
## Get the update info
660+
desync info --seed local_index.caibx --format=json update.caibx
661+
662+
## The value 'dedup-size-not-in-seed-nor-cache' will hold the size in bytes that needs to be downloaded
663+
```
664+
631665
## Links
632666

633667
- casync - [https://github.com/systemd/casync](https://github.com/systemd/casync)

0 commit comments

Comments
 (0)