Skip to content

martinak1/backr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

-L, --force-log
    Writes a log, even if there are no errors to report

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
* [ ] Re-implement fs::copy so that it doesn't attempt to set permission bits