• 0 Posts
  • 110 Comments
Joined 2 年前
cake
Cake day: 2023年8月2日

help-circle




  • CouncilOfFriends@slrpnk.nettoSelfhosted@lemmy.worldBacking up easily
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    3 个月前

    There are some useful options which can be found in the rsync manual although knowing which are redundant or conflicting can be tricky. If you run with the ‘n’ option first it will dry run, then you can remove the n to do the needful.

    rsync -navhP --no-compress --ignore-existing --mkpath source dest
    
    -n dry-run, no changes are made
    -a is for archive, which recursively preserves ownership, permissions etc.
    -v is for verbose, so I can see what's happening (optional)
    -h is for human-readable, so the transfer rate and file sizes are easier to read (optional)
    -P show progress
    --no-compress as there's no lack of bandwidth between local devices
    --ignore-existing will skip updating files that exist on receiver 
    -r is recursive, included in -a
    --mkpath will create the destination's path component