aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJan Sucan <jan@jansucan.com>2022-06-18 08:50:45 +0200
committerJan Sucan <jan@jansucan.com>2022-06-18 08:50:54 +0200
commit948a65cf39c8ce31c5adc0f24979e0cb55bc33c3 (patch)
treeae923f4594fef0abb777f63291d62530c345b229 /README.md
parente1d10bea5d9fc94ba800ade1de430c7f3c0ccacd (diff)
Refactor the command line interface
Select operation by its name instead of by number of the arguments.
Diffstat (limited to 'README.md')
-rw-r--r--README.md19
1 files changed, 8 insertions, 11 deletions
diff --git a/README.md b/README.md
index 9d6e155..cfb6a4e 100644
--- a/README.md
+++ b/README.md
@@ -9,21 +9,18 @@ e.g. the differential image file is read twice when restoring it.
## Synopsis
-> diff-dd [-s SECTOR_SIZE] [-b BUFFER_SIZE] [INFILE] REFFILE OUTFILE
+> diff-dd help
-## Usage
+> diff-dd backup [-s SECTOR_SIZE] [-b BUFFER_SIZE] INFILE REFFILE OUTFILE
-The utility is used for creating and restoring differential images
-created by it. Meaning of the ```INFILE``` and ```REFFILE``` depends
-on whether backup mode or restore mode is requested. Providing ```INFILE```
-selects the backup mode. Omitting it selects the restore mode.
+> diff-dd restore [-s SECTOR_SIZE] [-b BUFFER_SIZE] INFILE OUTFILE
## Backup
Using ```diff-dd ``` for backup requires the full backup image to
exist. Differential backup is created with:
-> diff-dd INFILE REFFILE OUTFILE
+> diff-dd backup INFILE REFFILE OUTFILE
The ```INFILE``` is a path to the file to backup differentially, the
```REFFILE``` is the full image, and the ```OUTFILE``` is the file to
@@ -33,9 +30,9 @@ which only the changed sectors of the ```INFILE```, compared to the
## Restore
The restoration means application of the changed sectors saved in the
-```REFFILE```, which is the differential image, to the ```OUTFILE```:
+```INFILE```, which is the differential image, to the ```OUTFILE```:
-> diff-dd REFFILE OUTFILE
+> diff-dd restore INFILE OUTFILE
## Options
@@ -55,13 +52,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 /dev/sda1 full.img diff.img
+> diff-dd backup /dev/sda1 full.img 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 diff.img /dev/sda1
+> diff-dd restore diff.img /dev/sda1
The first command restores the old full image. The second one applies
the differences.