view the rest of the comments
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: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
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!
A hilariously unnecessary Python script that could have easily been done in bash since it’s literally just a wrapper around rsync. 😅
When you’ve only got a Python-sized hammer in your toolbox, everything looks like a Python nail, I guess.
It's also to help me learn python. And it works for me. : ^ )
Bash does seem like a better fit for this kind of script since it is a lot more portable.
I.e.: It comes by default for many Linux distributions. For windows, a Git bash install will get you most utilities needed for large reliable scripts (grep, scp, find, sort, uniq, cat, tr, ls, etc.).
With that said, you should write it on whatever language you want, especially if it is for learning purposes, that’s where the fun comes from :)
Don't mind him. Any time someone shares code, there's always someone else who did nothing talking about how much better your code could have been. Just noise from the peanut gallery.
Yeah, no problem... I started out with just bare rsync - but I did the backup infrequently and needed my notes to know the command. Then I wrote a simple shell script to run the rsync for me. Then I decided I needed more than one backup, redundancy is good. Then I wanted to keep track of the backups so I had it write to .backuplog then that file started getting dated (every time I run a "sun" backup the record of the previous one is useless) so Finally TaDa! loci is born.
No need to be a dick
Looks like a line by line translation from the python. Will you use it to backup your home directory?
No.
It doesn’t really do anything I particularly need.
Can you please articulate why Python and Bash are so different in your eyes?
One needs to be ~~compiled~~ installed and the other is literally the de facto scripting language installed everywhere and intended for exactly this purpose.
My system came with Python3 installed. Debian 12.
Python does not need to be compiled, have you ever used it?
Do you wanna share a bash script, then?
Especially one that lets you know how long it's been since you took time to run a backup, keeps track of which set of backups could be updated, and which should be refreshed, and keeps a log file up to date and in .csv format so you can mess with it in a spreadsheet?
Ah, Improvements!