aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJan Sucan <jan@jansucan.com>2024-12-28 11:52:13 +0100
committerJán Sučan <jan@jansucan.com>2024-12-31 08:26:48 +0100
commite34296bbaa3b80a9c5c1bf6dba3ada28016f03de (patch)
tree88c4302c93ee9c0ef8946a0fc305774c4d7d22be /README.md
parent9280ff2c747a5a59f0a6e0cc6335b24de62cacc9 (diff)
Use options instead of positional arguments for file paths
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/README.md b/README.md
index 7572f9a..8139443 100644
--- a/README.md
+++ b/README.md
@@ -18,16 +18,16 @@ is read twice when restoring it. Because of that, it is slower.
> diff-dd help
-> diff-dd backup [-s SECTOR_SIZE] [-b BUFFER_SIZE] INFILE BASEFILE OUTFILE
+> diff-dd backup [-S SECTOR_SIZE] [-B BUFFER_SIZE] -i INFILE -b BASEFILE -o OUTFILE
-> diff-dd restore [-s SECTOR_SIZE] [-b BUFFER_SIZE] DIFFFILE OUTFILE
+> diff-dd restore [-S SECTOR_SIZE] [-B BUFFER_SIZE] -d DIFFFILE -o OUTFILE
## Backup
Using ```diff-dd ``` for backup requires the full backup image to
exist. Differential backup is created with:
-> diff-dd backup INFILE BASEFILE OUTFILE
+> diff-dd backup -i INFILE -b BASEFILE -o OUTFILE
The ```INFILE``` is a path to the file to backup differentially, the
```BASEFILE``` is the full image, and the ```OUTFILE``` is the file to
@@ -39,15 +39,15 @@ which only the changed sectors of the ```INFILE```, compared to the
The restoration means application of the changed sectors saved in the
```DIFFFILE```, which is the differential image, to the ```OUTFILE```:
-> diff-dd restore DIFFFILE OUTFILE
+> diff-dd restore -d DIFFFILE -o OUTFILE
## Options
-```-s``` sets the sector size by which the files will be processed
+```-S``` sets the sector size by which the files will be processed
(default is 512 B). It can be used to control granularity of
differential backup.
-```-b``` sets the size of the buffer for the sectors of the input and
+```-B``` sets the size of the buffer for the sectors of the input and
output file (default is 4 MiB). The input data is always buffered. The
output data are buffered only in backup mode.
@@ -59,13 +59,13 @@ First, the full image of the partition to backup has to be created:
When the user decides to create the differential image, he or she runs:
-> diff-dd backup /dev/sda1 full.img diff.img
+> diff-dd backup -i /dev/sda1 -b full.img -o diff.img
If a data accident happens, the partition can be restored by running:
> dd bs=4M if=full.img of=/dev/sda1
-> diff-dd restore diff.img /dev/sda1
+> diff-dd restore -d diff.img -o /dev/sda1
The first command restores the old full image. The second one applies
the differences.