From 465cfae874788e2ad8fa914503eaf3423e5b11af Mon Sep 17 00:00:00 2001 From: nxshock Date: Fri, 7 Apr 2023 14:58:30 +0500 Subject: [PATCH] Add usage and basic config examples --- README.md | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e91e1fb..01bcd33 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,58 @@ # backuper - + +## Usage + +### Incremental backup + +```sh +backuper i +``` + +### Full backup + +```sh +backuper f +``` + +### Search files in backup + +```sh +backuper s +``` + +### Recover files from backup + +```sh +backuper r +``` + +Examples: + +```sh +# Recover Go files relevant as of 01.01.2023 to /home/user/go directory +backuper r config.conf "*.go" "01.01.2023" "/home/user/go" +``` + +### Test backup for errors + +```sh +backuper t +``` + +## Basic config example + +Backup config files from `/etc` and sqlite files from `/var`: + +```toml +FileName = "backup" + +[[Patterns]] +Path = "/etc" +FileNamePatternList = ["*.conf", "*.toml", "*.ini", "*.yaml"] +Recursive = true + +[[Patterns]] +Path = "/var" +FileNamePatternList = ["*.sqlite"] +Recursive = true +```