Skip to content

Commit

Permalink
Add examples on how to calculate the download size of an update (#275)
Browse files Browse the repository at this point in the history
Signed-off-by: Ludovico de Nittis <[email protected]>
  • Loading branch information
RyuzakiKK authored Dec 5, 2024
1 parent 0260be9 commit 45fc6e3
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ cd desync/cmd/desync && go install
- `make` - split a blob into chunks and create an index file
- `mount-index` - FUSE mount a blob index. Will make the blob available as single file inside the mountpoint.
- `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
- `inspect-chunks` - Show detailed information about chunks stored in an index file
- `mtree` - Print the content of an archive or index in mtree-compatible format.

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

Get the size of the chunks that are required for an update, when using *compressed* chunks (default).
I.e. how much data a client needs to download.

```text
# Server
## Create the update index file
desync make --store /some/local/store update.caibx /some/blob
## Create a detailed JSON info file for the chunks
desync inspect-chunks --store /some/local/store update.caibx update_chunks_details.json
# Client
## Download the update_chunks_details.json file
## Get the update info
desync info --seed local_index.caibx --chunks-info update_chunks_details.json --format=json update.caibx
## The value in 'dedup-size-not-in-seed-nor-cache-compressed' will hold the size in bytes that needs to be downloaded
```

Get the size of the chunks that are required for an update, when using *uncompressed* chunks.

```text
# Server
## Create the update index file
desync make --store /some/local/store update.caibx /some/blob
# Client
## Get the update info
desync info --seed local_index.caibx --format=json update.caibx
## The value 'dedup-size-not-in-seed-nor-cache' will hold the size in bytes that needs to be downloaded
```

## Links

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

0 comments on commit 45fc6e3

Please sign in to comment.