bindiff/README.md
2025-05-23 15:16:40 +02:00

23 lines
1.7 KiB
Markdown

# bindiff
A program for making delta backups of binary files. It works in units of blocks, which by default are 8192 bytes large. A partial snapshot will contain complete copies of only the blocks that have changed since the most recent snapshot. When a partial snapshot would be larger than a complete copy, a complete snapshot is made. Partial snapshots depend on all the snapshots between it and the most recent complete snapshot. This means that if you have a complete snapshot made recently, you can delete all prior snapshots.
## Usage
A set of snapshots of one file are stored in one directory. Snapshots of different files cannot share a directory. To create a snapshot, use the following command:
`bindiff snapshot the-file-to-save snapshot-directory`
If there are no existing snapshots in `snapshot-directory`, an initial complete snapshot is created. If snapshots do exist, a snapshot of appropriate type will be created. The automatically created file name contains both the file name of the original file, a UNIX timestamp, and a file extension hinting at the snapshot type (`bdo` for original, `bdc` for complete, `bdp` for partial).
To restore a complete file from a snapshot, use the following command:
`bindiff restore snapshot-directory snapshot-file file-output`
The program will start at the timestamp found in snapshot `snapshot-file` and work backward through the snapshots in `snapshot-directory` to reconstruct the entire file, writing this reconstruction to `file-output`.
To describe a snapshot, use the following command:
`bindiff describe snapshot-file`
A list of properties of the snapshot will be printed to the terminal. This format is not guaranteed to be stable.