Koozali.org: home of the SME Server
Contribs.org Forums => General Discussion => Topic started by: idp_qbn on May 26, 2017, 04:26:20 AM
-
Hi, I have trashed the /home dir on a remote SME 9.2 server which runs AFFA. The system was fully updated.
Can I recover somehow with out travelling the 300km to do a site visit and doing a fresh installation?
I was trying to remove AFFA to re-purpose the server and halfway through typing "rm -rf /home/e-smith/db/affa" when I discovered that a double-tap on a touch screen was interpreted by the Terminal App as a RETURN. That happened just after I typed "rm -rf /home/" and by the time I noticed....ah, well, such is life.
There were no userfiles or users on the system, apart from the AFFA backups.
Is there any possible remote recovery?
Cheers
Ian
-
Ian there could be multiple ways.
-Best way would indeed to drive there and reinstall.
-Use a backup and restore
-What i would do if no backup, i would install a clean sme in a vm and then rsync the /home dir to your remote server
- might be able to achieve it too by reinstalling all the rpm owning a file or dir in the home, might be complicated to find them all.
By the way a trick with rm as root:
rm /home/e-smith/db/affa -rf
Works, and avoid issues if enter hit before puting the full path as the options will miss you will just get an error.
-
Thank you for those suggestions. :-)
I will try the VM and rsync method (steep learning curve but hey, that's what life is for, isn't it?).
I have used VMs on Windows, but never done anything directly with rsync.
I have a sneaking suspicion I may be on the train south next week with an SME disk in my hand.
That's a really good suggestion about putting the -rf at the end. I was just blindly following the howto, using a borrowed iPad: never again!
Whatever happens, I will post the outcome here.
Ian
-
Just a bump to let anyone interested know what happened.
I ended up taking the easy option - a weekend in Canberra (300 km away) seeing old friends and re-installing the backup server (HP ML-350, SME and AFFA).
There were too many obstacles to solving the problem remotely - compounded by having no local staff willing to work on a Linux machine following my phone intructions.
Since I broke the system, it was up to me to fix it.
That was easily done and everything works well now.
It is a testament to the usefullnes of AFFA.
The server I broke was the production server. I had run an AFFA backup before I started work, so the AFFA server was "up-to-date".
When I deleted the home directory (Idiots can be so powerful, can't we?), I managed to halt the production server. I performed a "RISE" on the AFFA server to be the new production server, which took about 20 minutes with 200 Gb data. The users were off the air for about half-an-hour, but at 22:00 at night, no-one was at work.
So, by 22:30 or so, the system was running, all the data was there and the next day everyone could do their work.
I could not remotely restart the old production server, which would have been a silly thing to do, anyway, since that would have caused an IP clash (two systems with the same IP). This is where I would have needed local hands on the keyboard and that was not going to happen.
Anyway, it was good to see old friends and Canberra is a lovely place to visit.
Thank you, Jean-Phillippe for your help. I am sure what you suggested would work but the difficulties meant a re-install was simpler.
Cheers :-)
Ian
-
Congrats, good for you!
-
Anyway, it was good to see old friends and Canberra is a lovely place to visit.
Cheers :-)
Ian
Don't often hear Canberra described that way :-)
-
Get me a ticket and a place to stay and I'll judge on that... ;-)