diff --git a/README.md b/README.md index 89cc0c4..4192a3e 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,82 @@ # Goblin Store -Incremental backup tool using rclone. +Incremental backup tool using rsync and rclone. ## Usage -To backup a directory, simply run it like so: +Goblin store provides two options to backup a directory - **cloud** and **local**. + +### Local Backups + +Local backups use rsync as the backend, as it provides better control over local file permissions and can utilize hardlinks to provide a "more complete" snapshot of the source directory on a given day. ```shell -./goblin-store backup -s -d +./goblin-store backup local -s -d ``` -Breaking down the above: +This will provide the following directory structure: + +```shell +DESTINATION_DIRECTORY/ +├── 2026-09-03_13-14-07/ <- Baseline backup +│ ├── dir1/ <- Real directory +│ │ └── data.bin <- Original file (inode: 1001) +│ ├── dir2/ +│ └── file1.txt <- Original file (inode: 1002) +│ +└── 2026-09-04_00-00-00/ <- Next snapshot (hardlinked against previous) + ├── dir1/ <- Real directory (recreated) + │ └── data.bin <- Unchanged: hard link to previous run (inode: 1001, 0 bytes used) + ├── dir2/ + ├── file1.txt <- Unchanged: hard link to previous run (inode: 1002, 0 bytes used) + └── file2.txt <- New file copied from source (inode: 1003) +``` + +Breaking down the above command: * `./goblin-store` - running the app binary -* `backup` - call the **backup** command +* `backup` - run the **backup** command +* `local` - run the **local** subcommand +* `-s ` - the directory you'd wish to backup (REQUIRED) +* `-d ` - the directory you'd wish to store the backups in (REQUIRED) + +You may modify the behavior with these additional flags: + +* `-v` - enable verbose console logging + +### Cloud Backups + +**Note:** Cloud backends are currently not integrated into the app, but they can be used currently if you prefer the latest/incrementals directory structure on local disk. + +Cloud backups utilize rclone as the backend for file copies, as it provides better support for cloud backends (S3, etc) and multi-threading support. + +```shell +./goblin-store backup cloud -s -d +``` + +This will provide the following directory structure: + +```shell +DESTINATION_DIRECTORY/ +├── 2026-09-03_13-14-07/ <- Baseline backup +│ ├── dir1/ <- Real directory +│ │ └── data.bin <- Original file (inode: 1001) +│ ├── dir2/ +│ └── file1.txt <- Original file (inode: 1002) +│ +└── 2026-09-04_00-00-00/ <- Next snapshot (hardlinked against previous) + ├── dir1/ <- Real directory (recreated) + │ └── data.bin <- Unchanged: hard link to previous run (inode: 1001, 0 bytes used) + ├── dir2/ + ├── file1.txt <- Unchanged: hard link to previous run (inode: 1002, 0 bytes used) + └── file2.txt <- New file copied from source (inode: 1003) +``` + +Breaking down the above command: + +* `./goblin-store` - running the app binary +* `backup` - run the **backup** command +* `cloud` - run the **cloud** subcommand * `-s ` - the directory you'd wish to backup (REQUIRED) * `-d ` - the directory you'd wish to store the backups in (REQUIRED) diff --git a/goblin-store b/goblin-store index 738c434..cfffb92 100755 Binary files a/goblin-store and b/goblin-store differ