PDA

View Full Version : Forum DB Backup



SimpleHuman
04-07-2010, 07:26 PM
Hello Guys

I have an IP Board forum. Can someone tell me how I can 100% backup the Database so that all my Threads and Posts ..etc are safe and backed up.

I would greatly appreciate any help.

Thank You.

SeLLeRoNe
04-08-2010, 03:22 AM
this is a directadmin user support forum, nothign to do with forum and user lvl...

if you are using directadmin panel, so, into mysql database option you can backup your entire database.

SimpleHuman
04-08-2010, 11:39 AM
Hello SeLLeRoNe

Yes I know that this is a DirectAdmin User Support Forum. And I DO USE DirectAdmin. That is why I am here.

I thought DirectAdmin would have built in some options for doing Database Backups. I shall go look for that MySQL you have mentioned.

Sorry I am a n00b as you can tell.

Thank you.

SeLLeRoNe
04-08-2010, 11:55 AM
What i meant is... if you got just user access so you should ask your provider.

Btw, into mysql section there is no backup option, my fault.. but.. with phpmyadmin you should be able to make backups of your entire structure and data...

Another way is user level backup that can be selective and backup what you say to backup...

It cant be put in cron yet (and that also depend if server admin allow cron for user) and... same as cron backup are avaible just if server admin made it possible at user level.. if he didnt, so your only way is do backup from phpmyadmin.

SimpleHuman
04-08-2010, 12:02 PM
Hi Again

I own the server. So I have all access. I have found this in SQL Management at the user level.

http://i39.tinypic.com/fbvxnt.jpg

As you can see there is an option to download the Database. So I right Click and do a Save As, and I get the database as a (.gz) file.

Does that mean I have my Database backed up now ? Also in that screenshot as you can see it says the DB size is 14.9MB, but that (.gz) file that I have downloaded is only 2.21MB >> Does this look right ? or is there something wrong ?

I want to be 100% sure that my Database Backups are COMPLETE. So that if something happens, I can get all my stuff back.

Thanks SeLLe

SeLLeRoNe
04-08-2010, 12:05 PM
the .gz file is a compressed file, so, should be 2.1mb... for have a backup that you are sure that work i suggest you to create a new database and try to import the backup in it, if success and you can see all tables and data on it with phpmyadmin, so, that backup is working perfectly :)

otherwise, you should run a mysqldump by console

mysqldump -uUSERNAME -pPASSWORD DB_NAME > DBBACKUP.SQL

Regards

SimpleHuman
04-10-2010, 05:54 AM
Otherwise, you should run a mysqldump by console

mysqldump -uUSERNAME -pPASSWORD DB_NAME > DBBACKUP.SQL

Regards


Hello Again SeLLe

I have been away trying to look for this console thing, and I think I have found it ! Is it in phpMyAdmin ? Here:

http://i41.tinypic.com/1z3z5ep.jpg

As to using that command:


Is it the username and password of the database user that I am support to put there?

Do I keep the little " -u " and little " -p " at the begining of that info that I'm suppose to place there ?

Where does the backup.gz end up ?


Sorry to have caused you this headache, I am a n00b. :(

Thank You Very Much.

floyd
04-10-2010, 12:41 PM
Console AKA Command Line. (http://en.wikipedia.org/wiki/System_console)

SimpleHuman
04-10-2010, 08:05 PM
Thanks floyd

So how do I access that console ?

nobaloney
04-10-2010, 09:50 PM
It's part of your operating system. Unless you're running Windows, in which case you probably want to install PuTTY (http://www.chiark.greenend.org.uk/~sgtatham/putty/).

No, I don't know how to install or use PuTTY; We run Linux on our desktops.

Jeff

floyd
04-11-2010, 04:47 AM
Thanks floyd

So how do I access that console ?

Apparently you did not install DirectAdmin yourself. It sounds more and more like you are not the server administrator. In that case you should contact your hosting company to see if command line access is even allowed. Most of us get remote command line access using SSH. If you do not already know how to use SSH then this is not the place to learn.

SimpleHuman
04-11-2010, 02:59 PM
Apparently you did not install DirectAdmin yourself. It sounds more and more like you are not the server administrator.

Hi Floyd

You are right, I did not install DirectAdmin myself. I asked my Hosting Company to install it for me on my Dedicated Server.

If I have a Dedicated Server, then surely I'm the Server Administrator right ? I am a total n00b I admit.

I have login details for SSH in my eMail, My Host sent me those. Will Do some research and get back to you guys.

Thanks

nobaloney
04-12-2010, 04:29 PM
@SimpleHuman:

With all due respect, owning a server doesn't make you an administrator anymore than owning a stethescope makes you a medical doctor.

It's probably unfair of me to say this, because after all my business is Contract Server Administration, but I strongly suggest you hire someone to administer your server, either full or part-time, or under contract (as we work), so you don't break your system or your hosted sites, or even worse, cause problems for the Internet at large.

Some of us on these forums have been administering linux servers for ten years or more (for exmple, I've been administrating linux servers for 15 years and unix servers before that); it's not something you can learn ovrenight.

Jeff

SimpleHuman
04-12-2010, 04:34 PM
With all due respect, owning a server doesn't make you an administrator anymore than owning a stethescope makes you a medical doctor.

Haha I like that, you are right, I'm sorry :)

The thing is, hiring someone to administer the server is expensive (I think). What prices are we looking at here ?

Thanks

nobaloney
04-12-2010, 06:24 PM
Ive got a website for that, and others have posted as well; in the Advertisements Subforum (http://www.directadmin.com/forum/forumdisplay.php?f=48).

My site: http://www.nobaloney.net/daservermgmt.html

Jeff

SimpleHuman
04-12-2010, 06:30 PM
:eek: like I said very expensive

Specially where all I want doing is a weekly 100% complete backup of my database for my forum. Also perhaps optimizing the tables ..etc you know little things !!!

It ain't like I'm running a hosting company ! LOL If I was running a hosting company then I may consider that price.

But for a guy like me, who is still a student that money way way to much. It is more expensive than what I pay for my server !!

I guess I will carry on my google research regarding the Console.

Thank You :)

nobaloney
04-12-2010, 07:04 PM
At least buy a good book on Linux/BSD systems administration.

It's not just using the console; it's what you do once you're in there.

Jeff

SimpleHuman
04-12-2010, 07:07 PM
Thanks Jeff

Can you recommend a book suitable for a n00b like me ?

Thank You. :)

nobaloney
04-13-2010, 10:27 AM
Unfortunately I cannot; it's just been too long since I needed one or used one. The books on my bookshelf aren't even in print anymore.

In the US and in some other countries you can generally walk into a Borders or Barnes and Noble bookstore, and browse. If possible, that's what I recommend.

Remember no matter what you'll read, none of it will apply specifically to Direct Admin, which handles much of the installation and administration for you. What you really need to know is how to feel comfortable doing things.

Linux Server Administration for Dummies appears to get mixed reviews; if you read all 7 reviews at Amazon you may be able to figure out or not if the book will help you.

Jeff

floyd
04-13-2010, 01:38 PM
Thanks Jeff

Can you recommend a book suitable for a n00b like me ?

Thank You. :)

I recommend setting up a server at home first and try things on it before you try it on a production server.

nobaloney
04-13-2010, 09:10 PM
@simplehuman,

If you're in the US send me your snailmail address in a PM, and I'll clean off my bookshelf and send you some old books which may be helpful.

Jeff

SimpleHuman
04-16-2010, 09:09 AM
That is very kind of you JLasman :) Thank You for the offer.

I actually live in the United Kingdom.

SimpleHuman
04-16-2010, 09:22 AM
Guys Can you please check these setting that I've done for automating the Database Backup process a bit.

http://i39.tinypic.com/15qojtx.jpg

Have I got all settings correct for doing a weekly backup of my Databases ? (this was done in Admin Level) Also day of the week [ 2 ] << what day is that ?

Thank you soo much for putting up with a n00b like me. I'm still looking for a good book that will teach me all this stuff.

Thank You.

floyd
04-16-2010, 09:24 AM
Guys Can you please check these setting that I've done for automating the Database Backup process a bit.

http://i39.tinypic.com/15qojtx.jpg


The image doesn't seem to have anything to do with a backup.

SimpleHuman
04-16-2010, 09:28 AM
The image doesn't seem to have anything to do with a backup.

LOL Check again please :D my bad !

nobaloney
04-16-2010, 09:51 AM
It's hard to tell; we can't see what you see when you pull those sliders at the bottom down.

Are you just trying to back up databases? If so then you can remove most of those files and directories at the bottom.

If you're doing a full backup, then you should check all three settings under Configure Full System Backup.

Remember thast the sysbk system backup doesn't have any resotre capabilities; to use them you're on your own.

After doing a MySQL backup you should check to make sure you're backing up MySQL databases properly, not just backing up the files. It's been so long I don't remember which it does.

Jeff

SimpleHuman
04-16-2010, 10:33 AM
It's hard to tell; we can't see what you see when you pull those sliders at the bottom down.

Are you just trying to back up databases? If so then you can remove most of those files and directories at the bottom.

Hi Jeff, Yep I am only trying to do a Database Backup. So I don't think you need to see what's at the bottom of the sliders, neither do I by the way, since I had not ticked the box for [ Backup directories and files listed below ]


If you're doing a full backup, then you should check all three settings under Configure Full System Backup.

Remember thast the sysbk system backup doesn't have any resotre capabilities; to use them you're on your own.

After doing a MySQL backup you should check to make sure you're backing up MySQL databases properly, not just backing up the files.

Nope I am not doing a full Backup, just the Database Backup. I understand regarding the Restore.

If I backup the MySQL files .. isn't that the same as Backuping the MySQL databases properly ? :confused:

PS. No body mentioned what Day, Day 2 of the week would be !!

Thanks Jeff.

floyd
04-16-2010, 01:29 PM
I always have to google it.
http://adminschoice.com/crontab-quick-reference

SeLLeRoNe
04-16-2010, 03:06 PM
man i suggest you to use admin lever backup/restore and not system backup, first cause got restore option, second cause he do backup in the right way, or, if you dont want to backup all data for each user, i suggest you a script using ssh for make backup automatically.. ofc ive read your not expert, if u need help, i can (if you want and for free ofc) log into your server and configure the same way of backup i got.

regards

nobaloney
04-18-2010, 01:51 AM
If I backup the MySQL files .. isn't that the same as Backuping the MySQL databases properly ? :confused:
After you get the backup, what file(s) do you get? Are they text files with data that MySQL uses to restore the database, or are they the actual database files? You want the former.

PS. No body mentioned what Day, Day 2 of the week would be !!
On every system I've ever seen you get your choice of 0 or 7 for Sunday:

0 = Sunday
1 = Monday
2 = Tuesday
3 = Wednesday
4 = Thursday
5 = Friday
6 = Saturday
7 = Sunday

For the future, know you can always look at a file structure in the online manual, for file structures that are supported therein.

For exmple:

$man 5 crontab
Jeff