Easy/Efficient Backup Of Data
A command-line utility that makes the process of manual backups easy and efficient.
While taking local backups, we either have to over-write a folder that we have already backed up and would like to add some more file to. This has to be done as there might be already existing files, files with same names in both source and destination directories but having different content, i.e., different modified times.
ebod is a command-line tool that can be used in such scenarios. It backs up data smartly and efficiently by reading the directory structure and backing up just the files that are required to be backed up. You can even sync your source and destination directories with the sync subcommand.
ebod was created as a easy way to create local backups. A naive implementation of the backing up and syncing mechanisms have been created.
You can now install ebod through cargo with the command:
cargo install ebodYou can build ebod from source by cloning this repository, cd into the repository and running
cargo build --releaseThen you just have to add the path of the application, usually in <path-to-repo>/target/release/, to your system's PATH variable.
If you are on a Windows (x86_64) system, then you can refer to the build binary in Releases section. Download it and add the path of the parent folder to PATH variable.
ebod is not only a binary. It is also a library. You can use ebod as a library from the release v1.1.1. You can add ebod to your cargo project with the command:
cargo add ebodor by adding the following line to your Cargo.toml:
ebod = "1.1.1"The init subcommand is used to initialise a directory so that ebod can effieciently transfer the data in the directory.
The init subcommand works by recursively traversing the directory structure of the input path and
ebod init [PATH] [OPTIONS][PATH] -> The path of the directory in which ebod must be initialized. By default it is the current directory, ".".
Include Hidden files and Directories
-a, --include-hidden
Tell ebod to include hidden files while traversing the directory.
The backup command is used to backup files from the src directory into the dest directory.
It first initializes both the directories and uses the generated metadata to efficiently backup files.
ebod backup <SRC> [DEST] [OPTIONS]<SRC> -> The source directory.
[DEST] -> The destination directory, by default it is the current directory (".")
Include Hidden files and Directories
-a, --include-hidden
Tell ebod to include hidden files while traversing the directory.
The sync subcommand is used to sync the directories in the input paths by copying the latest files and directories from each of them into the other.
The sync command works by calling the init command first on both the src and dest directories, then backing up src into dest. Then dest is re-initialized, and the files in dest are backed up into src.
NOTE: There is a small issue that has been discovered. sync command is not working the same in Windows and Linux Systems. This leads to two copies of the same file to result in a single folder while syncing them. The duplicated files will start with ebod-<src|dest> and hence can be deleted easily. Please use sync command with care. This issue is being investigated and will be resolved soon.
ebod sync <SRC> [DEST] [OPTIONS]<SRC> -> The source directory.
[DEST] -> The destination directory, by default it is the current directory (".")
Include Hidden files and Directories
-a, --include-hidden
Tell ebod to include hidden files while traversing the directory.
For source code of ebod from crates.io, visit docs.rs - source
For more documentation to use the package, visit docs.rs - docs
