PDA

View Full Version : Need help saving me from myself. (CentOS SSH backup then restore)


turtle
2008-12-28, 23:52
So I was doing system updates on my server because I haven't in forever. Plesk asked me to go ahead and update and so I did. Problem is that my host has a license for Plesk v8 and I just upgraded to v9. Now I can't access many of my server functions because the key is invalid. I can't do a whole lot that involves their UI. I have full root access though and can even access my email account via Mail.app still.

So I'm guessing that I just toasted all my v8 preferences in Plesk too, safe assumption? So my current plan is backup my mail to my local machine. Archive my httpdocs folders and other such data I access via FTP. I don't however have configured full FTP access to my server. So I'll have to use Terminal to access the other core folders.

Is there anything of great importance that I should backup before having my server have a fresh reinstallation? Seems I forgot to create a valid backup too. :(

turtle
2008-12-29, 01:09
The databases in MySQL are soemthing that I just realized I'll need. Sadly, I only know how to access them via Plesk/phpMyAdmin. Is there a way to access phpMyAdmin without Plesk?

Brad
2008-12-29, 01:26
The databases in MySQL are soemthing that I just realized I'll need. Sadly, I only know how to access them via Plesk/phpMyAdmin. Is there a way to access phpMyAdmin without Plesk?

Sure, you can install and configure it yourself (http://www.phpmyadmin.net/home_page/). Just drop it into an Apache-reachable web directory and edit the config files accordingly. In the long run, though, you'd be better off learning enough MySQL syntax to run from the command line. phpMyAdmin is a really good crutch for beginners (I know, I've used it myself), but having shell access to the database is a real boon for any complex work.

Brad
2008-12-29, 01:30
That said, I've never managed Plesk; so, I can't speak for any changes/damage the upgrade might have done. Sorry, man. :\ Chock this one up to a life lesson of "backup before installing". I've learned the hard way like this, too.

turtle
2008-12-29, 02:20
I can breathe!!!

Turns out S4Y got a license and I now have a valid copy of v9 running on my server. I didn't seem to lose anything yet though I have some reconfiguring to do.

I'm gonna heed your advice though Brad. I'm really trying to learn more command line methods so I can avoid UI reliant ones if I can. It's so much like my old days with MS-DOS and such.

Brad
2008-12-29, 03:04
Good to hear! :)

The one thing to keep in mind when starting to learn about the *nix command-line shells: everything is a "pipe". The output from one command can be piped as the input into another command and that output into another command ad infinitum. There are lots of text-processing commands at your ready to parse and reformat the output of one command in preparation for another command or writing out to a file.

With MySQL, for example, you can reload a saved database dump by merely piping that file into the "mysql" command itself.

For practicing with MySQL, here are a few places to start:
http://www.w3schools.com/sql/default.asp
http://dev.mysql.com/doc/refman/5.0/en/tutorial.html
http://www.mysqltutorial.org/

turtle
2008-12-29, 13:46
Thanks for the links Brad. I'm working through them and now thinking I might actually want to take some real classes on some of these things. I absolutely hate not knowing how to do something and being powerless when I make an error. Last night was a great example. I knew what I needed to do but had no idea how to do it. I don't like that. :(

Brad
2008-12-29, 14:34
Thanks for the links Brad. I'm working through them and now thinking I might actually want to take some real classes on some of these things.
The one thing to keep in mind when starting to learn about SQL: everything is relational algebra which at its core it just set theory. All your table joins are just unions, intersections, cartesian products, and complements! Once you really get into that mindset and understand the basic SQL language, writing large, complex queries becomes a breeze.

Maybe I should create a "the one thing to keep in mind" blog or something. :)

Partial
2008-12-30, 12:17
To follow up Brad's advice, I recommend looking into some of the data transformation functionality. to_char and to_date have been particularly helpful with changing a timestamp into a totally different piece of data. Leave this until after you're comfortable with relational algebra and basic SQL statements.