Wood screws for database administrators :-)
Was Database/Systems admin, now #Retired.
#Selhosting #FOSS #HomeAssistant
| Website | https://whatdidilearn.today |
| Website | https://whatdidilearn.today |
Wood screws for database administrators :-)
That was Bria, our Cocker Spaniel.
Photo by a friend of ours.
This is also Bria, high flying ...
Low flying Spaniel ..
Need a way to run command and for it to timeout after a set duration?
use 'timeout', e.g.
timeout --preserve-status --kill-after=5s --signal=SIGINT 3s ping 192.168.1.153
See man page for details:
https://www.man7.org/linux/man-pages/man1/timeout.1.html
In my experience it's best to use -
--preserve-status which returns the exist status of command rather than timeout.
--signal to specify a signal rather than accepting the default (SIGTERM), most commands should handle SIGINT gracefully.
Quite pleased with this.
1 year uptime of 99.9% for website hosted on our internal LAN served to internet using #Headscale
Can't go out without me if I have your shoe.
Need to copy a file or directory as root from one server to another?
Cannot (rightly) SSH to either server directly as root?
Do have SSH access to both source and target with a user with sudo ?
Use rsync with --rsync-path option, e.g.
sudo rsync -avuP --rsync-path "sudo rsync" /source/path/ user@remote:/remote/path/
Maybe an under appreciated utility - incron (inotify cron).
A crontab-like syntax enables you to run scripts on specified file or directory events.
I use it to stash logfiles to a central location from several hosts.
There is a good write up here: https://oneuptime.com/blog/post/2026-03-02-use-incron-cron-like-file-monitoring-ubuntu/view