Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil.
-
No spam.
-
Posts are to be related to self-hosting.
-
Don't duplicate the full text of your blog or readme if you're providing a link.
-
Submission headline should match the article title.
-
No trolling.
-
Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.
-
AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
view the rest of the comments
I don't know of a pre-wrapped utility to do that, but assuming that this is a Linux system, here's a simple bash script that'd do it.
That'll drop a text file at
/tmp/storage-history/files.txtwith a list of the files at that location, and create a git repo at/tmp/storage-historythat will contain a history of that file.When your drive array kerplodes or something, your files.txt file will probably become empty if the mount goes away, but you'll have a git repository containing a full history of your list of files, so you can go back to a list of the files there as they existed at any historical date.
Run that script nightly out of your crontab or something (
$ crontab -eto edit your crontab).As the script says, you need to choose a file_list_location (not
/tmp, since that'll be wiped on reboot), and set path_to_monitor to wherever the tree of files is that you want to keep track of (like,/mnt/file_arrayor whatever).You could save a bit of space by adding a line at the end to remove the current files.txt after generating the current git commit if you want. The next run will just regenerate
files.txtanyway, and you can just usegitto regenerate a copy of the file at for any historical day you want. If you're not familiar withgit,$ git logto find the hashref for a given day,$ git checkout <hashref>to move where things were on that day.EDIT: Moved the
git checkoutup.That's incredibly helpful and informative, a great read. Thanks so much!
Abefinder/Neofinder is great for cataloging but it costs money. If you do a limited backup it's good to know what you had. I use tape formatted to LTFS and Neofind both the source and the finished tape.