I have a library of movies, TV shows and music for local hosting. Right now I have a script that uses cp to copy newly added media files to a second, identical drive in another room as a backup. there has to be a better way to do this.

ignoring cloud storage and RAID, what are some command line tools that could ensure that the integrity of the files remains intact? assuming the drive continues to function properly.

  • ChaosMaterialist [he/him]@hexbear.net
    link
    fedilink
    English
    arrow-up
    3
    ·
    21 days ago

    Right now I have a script that uses cp to copy newly added media files to a second, identical drive in another room as a backup. there has to be a better way to do this.

    I would use rsync. It can be told exactly what kind of updates are needed from many different criteria, including modified time and file hashing. This is likely what you want.

    I sometimes use git as a form of backup, particularly my writing, that I push to remote locations. Its great for text, but not so much for already compressed media.

    Finally, I also use syncthing (which is a full program, not a CLI tool) to keep several machines synced up. There are many file versioning options and encryption that can be set independently on each machine.