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

askchapo

22888 readers
1 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
[–] machinya@hexbear.net 2 points 1 month ago

backups will depend lots on your setup and how far you want to go with it. if you use filesystems like btrfs or zfs you can copy snapshots (across different computers, multiple disks in the same computer, across the web). there are tools dedicated to backup like borg that tries to simplify the whole process. if you want to diy, you can use rsync to do checksumming and copying only new or different files. you can even do snapshot-like backups with a bit of effort.

regardless of the method you use, keep in mind backups are for when things go wrong. ensure they are accesible to you whenever you need them (physically accesible, you have the keys if you chose to encrypt them, the hardware is in good state, things like that). people tend to recommend to keep at least 3 copies in two different formats and one in a different physical place (also known as the 3-2-1 rule) in case you loose two copies at the same time (in case of natural disaster for example).