Skip to content

RyanSkraba/skrync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Skrync Java CI

(This is a project in progress)

My file synchronization tool.

Goals

  1. Save the state of all files recursively from a root directory: size and MD5 or SHA1, date, attributes
    • As a file ✔️
    • Automatically generating a descriptive, dated filename ✔️
    • Showing progress ✔️
    • Interruptable and resumable.
  2. Print some statistics on the files that were discovered.
    • Number of files.
    • Largest files that have duplicates.
    • Largest directories that have duplicates.
  3. Compare two states to find the differences.
    • Equals only. ✔️
    • Info.
    • New files. ✔️
    • Deleted files. ✔️
    • Moved and/or renamed.
    • Copied...?
  4. Rectify the differences. ❌ (not started)
    • Progress
    • Copy new files from source to destination.
    • Move files in the destination.
    • Delete files.
    • Log and/or stash all changes that would lose data in the destination.
# Create with default name (media_username_MYDISK__20210101120000).
# Unlikely that it exists already due to the timestamp.
skrync digest --srcDir /media/username/MYDISK/backup \
    --dstDigest /media/username/MYDISK/.skrync/
skrync digest --srcDir /media/username/MYDISK2/backup \
    --dstDigest /media/username/MYDISK2/.skrync/

# Dry run it (produces a plan)
skrync compare \
    --srcDigest \
    /media/username/MYDISK/backup/.skrync/media_username_MYDISK__20210101120000 \
    --dstDigest \
    /media/username/MYDISK2/backup/.skrync/media_username_MYDISK2__20210101120010

# Do it.
skrync execute --srcDigest \
    /media/username/MYDISK/backup/.skrync/media_username_MYDISK__20210101120000 \
    --dstDigest \
    /media/username/MYDISK2/backup/.skrync/media_username_MYDISK2__20210101120010 \
    --backup /tmp/skrync_changed/
skrync execute --plan /tmp/todo/plan.json --backup /tmp/changed/

Running the launcher

mvn package
# Using the fat jar
alias skrync='java -jar '$(pwd)'/target/skrync*-SNAPSHOT.jar'
skrync --help

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages