Go to file
2023-04-08 14:02:36 +05:00
.gitattributes Initial commit 2023-03-11 14:13:35 +05:00
.gitignore Initial commit 2023-03-11 14:13:35 +05:00
backuper.go Rework 2023-04-03 19:43:16 +05:00
config.go Rework 2023-04-03 19:43:16 +05:00
consts.go Rework 2023-04-03 19:43:16 +05:00
extractionplan.go Rework 2023-04-03 19:43:16 +05:00
filehistory.go Rework 2023-04-03 19:43:16 +05:00
go.mod Update klauspost/compress dependency 2023-04-05 21:13:13 +05:00
go.sum Update klauspost/compress dependency 2023-04-05 21:13:13 +05:00
index_test.go Rework 2023-04-03 19:43:16 +05:00
index.go Remove uncompleted file on any error 2023-04-08 14:01:44 +05:00
LICENSE Initial commit 2023-03-11 14:13:35 +05:00
logger.go Rework 2023-04-03 19:43:16 +05:00
main.go Autodetect datetime format 2023-04-08 14:02:36 +05:00
make.bat Add makefile for Windows 2023-03-18 15:23:37 +05:00
pattern.go Rework 2023-04-03 19:43:16 +05:00
README.md Add usage and basic config examples 2023-04-07 14:58:30 +05:00
utils_test.go Autodetect datetime format 2023-04-08 14:02:36 +05:00
utils.go Autodetect datetime format 2023-04-08 14:02:36 +05:00

backuper

Usage

Incremental backup

backuper i <config file path>

Full backup

backuper f <config file path>

Search files in backup

backuper s <config file path> <mask>

Recover files from backup

backuper r <config file path> <mask> <files datetime> <path to recover>

Examples:

# 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

backuper t <config file path>

Basic config example

Backup config files from /etc and sqlite files from /var:

FileName = "backup"

[[Patterns]]
Path = "/etc"
FileNamePatternList = ["*.conf", "*.toml", "*.ini", "*.yaml"]
Recursive = true

[[Patterns]]
Path = "/var"
FileNamePatternList = ["*.sqlite"]
Recursive = true