Portable incremental backup utility written in C (C11) without any dependencies.
C Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Deb.h
FileSys.c
FileSys.h
Fnv1a.c
Fnv1a.h
JsonArr.c
JsonArr.h
JsonEle.c
JsonEle.h
JsonObj.c
JsonObj.h
JsonProp.c
JsonProp.h
JsonState.h
JsonStateInput.c
JsonStateInput.h
JsonType.h
JsonVal.c
JsonVal.h
LICENSE.md
Makefile
Obj.c
Obj.h
ProgressBar.c
ProgressBar.h
README.md
Stack.c
Stack.h
StackEle.c
StackEle.h
Str.c
Str.h
Sys.c
Sys.h
json.c
json.h
json_state_arr_begin.c
json_state_arr_begin.h
json_state_arr_end.c
json_state_arr_end.h
json_state_begin.c
json_state_begin.h
json_state_boolean.c
json_state_boolean.h
json_state_null.c
json_state_null.h
json_state_number.c
json_state_number.h
json_state_obj_begin.c
json_state_obj_begin.h
json_state_obj_end.c
json_state_obj_end.h
json_state_prop_begin.c
json_state_prop_begin.h
json_state_string.c
json_state_string.h
json_state_val_begin.c
json_state_val_begin.h
json_state_val_end.c
json_state_val_end.h
json_state_val_next.c
json_state_val_next.h
macros.h
main.c

README.md

pib

Portable incremental backup utility written in C (C11) without any dependencies.

Usage

Create backup of folder (usually the only command you need)

pib b <input folder path> <output folder path>

This snipit will copy all the files from the input to the output folder and create a file .pib in the output folder that holds checksums for all stored files.

Each time the exact same command as above is executed, after the first backup, the application will look for changes in the input folder and modify the output folder contents to match the input folder's contents by just deleting, creating or updating the necessary files and subdirectories (incremental).

This is done by comparing the file checksums and file sizes for the input folder created during each run with the checksums and sizes stored in .pib data file found in backup (output) folder.

The deletions, creations and updates planned will be presented to the user beforehand.

If deletions and/or updates of files are necessary, the user will be asked, if the application shall proceed.

The .pib data file will be updated during the backup process (to match the new content of output folder).

Verify data file in backup (output) folder

pib v <output folder path>

Checks, if the .pib file in the backup (output) folder matches the actual content of the backup folder.

(Re-)create data file in backup (output) folder

pib c <output folder path>

(Re-)creates the .pib data file. File's content will reflect the backup (output) folder's contents.

Show folder informations

pib i <folder path>

Prints count and (byte) size of all files and subfolders included in folder at given path.

License

See the LICENSE file for license rights and limitations (ISC).