blob: 57dfed30d5e52e2753f90e0b557ed0db7613c14e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
***
**!! This is a Pre-alpha version. Expect breaking changes and bugs. !!**
***

# diff-dd
This simple utility was created to reduce size of backup images of disk
partitions. It is intended to be used in conjunction with ```dd``` or similar
utility.
## Synopsis
> diff-dd help
> diff-dd version
> diff-dd create [-B BUFFER_SIZE] -i INFILE -b BASEFILE -o OUTFILE
> diff-dd restore [-B BUFFER_SIZE] -d DIFFFILE -o OUTFILE
## Create
Using ```diff-dd ``` for backup requires the full backup image to
exist. Differential backup is created with:
> diff-dd create -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
which the changed data of the ```INFILE```, compared to the
```BASEFILE```, their offsets, and sizes will be saved.
## Restore
The restoration means application of the changed data saved in the
```DIFFFILE```, which is the differential image, to the ```OUTFILE```:
> diff-dd restore -d DIFFFILE -o OUTFILE
## Options
```-B``` sets the size of the buffer for the data of the input and
output files (default is 4 MiB). The input data is always buffered. The
output data is not buffered in the restore mode.
## Example
First, the full image of the partition to backup has to be created:
> dd bs=4M if=/dev/sda1 of=full.img
When the user decides to create the differential image, he or she runs:
> diff-dd create -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 -d diff.img -o /dev/sda1
The first command restores the old full image. The second one applies
the differences.
|