this post was submitted on 15 Jan 2025
15 points (100.0% liked)

askchapo

22968 readers
446 users here now

Ask Hexbear is the place to ask and answer ~~thought-provoking~~ questions.

Rules:

  1. Posts must ask a question.

  2. If the question asked is serious, answer seriously.

  3. Questions where you want to learn more about socialism are allowed, but questions in bad faith are not.

  4. Try !feedback@hexbear.net if you're having questions about regarding moderation, site policy, the site itself, development, volunteering or the mod team.

founded 4 years ago
MODERATORS
 

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.

you are viewing a single comment's thread
view the rest of the comments
[–] ChaosMaterialist@hexbear.net 3 points 3 months 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.