rSync to remote location for mirroring of a plex library. Continual disconnects

Viewed 29

Attempting to mirror a Plex library to remote. The following disconnects multiple times per day. Files that are incomplete on disconnect do not resume (I would like them to.)

Suggestions on how to make this more reliable, resume via checksum, and stop disconnecting?

rsync -avi -b --backup-dir=/volume1/PLEX/removed --progress --append -e 'ssh -p222' /mnt/MoviesMnt user@XX.XX.XX.XX:/volume1/PLEX --delete-after --out-format="%t %f"

1 Answers

You should use --partial option. It will tell rsync to keep partial files. At the next restart it will reuse this partial file. Another suggestion may be to use a while loop as:

    while true
    do rsync -avi --partial -b --backup-dir=/volume1/PLEX/removed --progress --append -e 'ssh -p222' /mnt/MoviesMnt user@XX.XX.XX.XX:/volume1/PLEX --delete-after --out-format="%t %f" 
    done

so if the command will fail it will be automatically re-executed. You can place it inside of a script, or directly in cli.

Related