backr

Crates.iobackr
lib.rsbackr
version0.5.0
sourcesrc
created_at2018-05-08 18:00:31.811508
updated_at2018-06-15 20:03:43.892756
descriptionA program that backs up user data that matches a regular expression
homepage
repositoryhttps://github.com/martinak1/backr
max_upload_size
id64357
size27,617
Alex Martin (martinak1)

documentation

README

Backr - Backs up user data

Crates.io Crates.io Build Status Crates.io

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

Options

-d, --destination <DESTINATION_PATH>
    The path to the location you want the data saved to.

-o, --output_file <output_file>
    Specifies the location that failed transfer paths are written to
    [default: "<DESTINATION_PATH>/backr_log.txt"]

-r, --regex <regex>
    Passes a regex to the program to only backup matching files and directories.
    [default: "Documents|Downloads|Movies|Music|Pictures|Videos"]

-s, --source <SOURCE_PATH>
    The path to the User directory you want to backup.
    [default: <CURRENT_WORKING_DIRECTORY>]

-t, --threads <NUM>
    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
* [ ] Implement hash check options
* [ ] Implement compression options
* [ ] Implement incremental updates of compressed backups
* [ ] Re-implement fs::copy so that it doesn't attempt to set permission bits

Benchmarks - Better benchmark coming soon

Command           Time (min)    GB/min
--------------------------------------
`cp -r`             33:50       ~1.21
`rsync -r`          32:15       ~1.27
`backr (0.2.2)      22:58       ~1.78
`backr -apt 3`      20:26       ~2
`backr -apt 7`      16:36       ~2.49

This test was conducted by using the `time` command to measure the run time
of each program as it copied 41GB of data from a remote location to a
remote destination. Take the results with a grain of salt as the test is
very simple and was performed in a very loosely controlled environment.

Specs of test Machine:
    Cpu: i7-4770 @ 3.9GHz
    OS: Fedora 28 4.16.14-300.fc28.x86_64
    Rust ver: rustc 1.26.2 (594fb253c 2018-06-01)
Commit count: 41

cargo fmt