https://github.com/martinak1/backr
A cross platform backup tool written in Rust
https://github.com/martinak1/backr
backup-utility bsd-3-clause cargo clap regex rust rust-lang
Last synced: 4 months ago
JSON representation
A cross platform backup tool written in Rust
- Host: GitHub
- URL: https://github.com/martinak1/backr
- Owner: martinak1
- License: bsd-3-clause
- Created: 2018-05-08T17:12:12.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-16T21:59:37.000Z (about 7 years ago)
- Last Synced: 2025-08-01T18:55:39.979Z (5 months ago)
- Topics: backup-utility, bsd-3-clause, cargo, clap, regex, rust, rust-lang
- Language: Rust
- Homepage:
- Size: 33.2 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Backr - Backs up user data
[](https://crates.io/crates/backr) [](https://crates.io/crates/backr) [](https://travis-ci.org/martinak1/backr) [](https://crates.io/crates/backr)
## Please feel free to contribute, leave feedback, fork, or open an issue
## Examples
Backup all data in the Home directory
$ backr -a -s $HOME -d backup_dir
Update an existing backup, showing a progress bar and using 5 threads
$ backr -aupt 5 -s $HOME -d backup_dir
Passing a custom regex so that only files/folders that match will be copied
$ backr -r ".*(\.bak|\.cpp|\.rs)" -s $HOME -d backup_dir
## Flags
-a, --backup-all
Backup all files found, overriding the regex. Because of this, it
conflicts with the regex option.
-h, --help
Prints help information
-p, --progress
Displays a progress bar during the backup.
-u, --update
If this flag is set, backr will check the metadata of the source
file and the already existing destination file, and will keep
the newest one.
-V, --version
Prints version information
-L, --force-log
Writes a log, even if there are no errors to report
## Options
-d, --destination
The path to the location you want the data saved to.
-o, --output_file
Specifies the location that failed transfer paths are written to
[default: "/backr_log.txt"]
-r, --regex
Passes a regex to the program to only backup matching files and directories.
[default: "Documents|Downloads|Movies|Music|Pictures|Videos"]
-s, --source
The path to the User directory you want to backup.
[default: ]
-t, --threads
Number of threads that will be used to backup files
[default: 2]
## Goals
* [ ] Make backup and walk functions concurrent
* [ ] Create better benchmarks
* [ ] Remove as many unwraps as I can from the source
* [ ] Re-implement fs::copy so that it doesn't attempt to set permission bits