Skip to content

It Won't Ever Happen Again. Synhronize backup program written in Java

License

Notifications You must be signed in to change notification settings

krypciak-zz/IWEHA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

It Won't Ever Happen Again.

IWEHA is an synchronie-type backup tool. What does that mean?
It means it copies only new or modified files, to keep the backup up-to-date.

Usage

Using FreeArgParser as an argument parser.
Short Name Long Name Argument Type Is Required Description
-dp --datpath String + Path to .dat file of your backup. If you don't have one yet, put "".
-de --destination String + Files will be copied into /your/path/ + /path/to/file/copied
-tb --toBackup String[] + Either file paths or directory paths.
-e --excluded String[] File or directories that will be skipped.
-i --ignoreCache none If selected, will ignore all all files or directories that contain "cache" in their name. Recommended for big directories.
-l --doLog none If selected, will print to terminal all copied files.
-rl --reduceLog int If this and doLog is selected, will print copy logs only every X time.
-rf --removeFiles none If selected, files that were indexed in the backup don't exist anymore in the original direcotry will get moved into /dest/path/IWEHA_DELETED/path/to/file

Example:

java -jar IWEHA.jar -dp /home/krypek/iweha.dat -de /mnt/sda1/backup/ -tb [/home/krypek/Documents/, /home/krypek/Downloads/] -l -rl 10 -rf

How does it work?
It checks original file mofification date and compares it with modification date stored in a HashMap.
If original modification date is bigger, the file is copied and the new modification date is stored in
an another HashMap that is later serialized into .dat file.
This way IWEHA doesn't copy unnecessary files.

If --removeFiles is selected, if file is indexed (in .dat file) and the original file is deleted,
the file gets moved from /dest/file to /dest/IWEHA_DELETED/file.


Questions? You can e-mail me at krypek@tuta.io.