2 ms·
At $work, I walked an admin through changing some settings of a software I had co-developed. After we were done, we deleted some caches cd /var/lib/$applicatio
by perlgeek 12y ago
At $work, I walked an admin through changing some settings of a software I had co-developed. After we were done, we deleted some caches
cd /var/lib/$application/cache
find -type f -delete
But that application was actually load-balanced on a second machine; we didn't need to change the configuration there, but still had to delete the caches. So he ssh'd (as root) right into it, and copy&pasted the 'find -type f -delete' right away, and pressed enter while I cried NOOOOOOO. Too late he realized he didn't change the directory first.
He was about to log out, and instead ssh into the backup server to recover the lost files, but I stopped him from logging out - the previous operation had erased the .ssh/authorized_keys file from /root.
In the end, no harm was done, the backups were only 8 hours, and nobody noticed any interruption.