PDA

View Full Version : Backing up forum db for install of vbpg


Pages : [1] 2

NickT'sGTP
12-13-2006, 10:37 PM
I was sending noppid pms and then read his sig...haha...my bad...

Anyways...

Everytime I try to use my info provided to me via Hostway I keep getting errors in SSH when I try to backup the database....so I was wondering if it was a bad idea to install the vBPicGallery without backing up the database.

has anyone done this? And did it have any ill affects?

thanks!

remember....I'm a n00b.

Greg
12-13-2006, 10:52 PM
While in most cases you may not have an issue, there is always the chance of a problem. So at a minimum you should backup you DB.

As for a mysql backup at the CLI in SSH and assuming you are using cpanel, try this string. This may work or show most anyone how to get a DB backup via ssh too.

Login into ssh. You should be at your home folder.
Make a backup folder. "mkdir backup"
Change to the folder. "cd backup"
Do the backup...

mysqldump -Q -u DB_USERNAME -pDB_PASSWORD DB_NAME > forum_backup.sql


All the info you need for the DB_USERNAME, DB_PASSWORD and DB_NAME are in your vBulletin /forums/includes/config.php.

For more backup ideas, see this thread. How to Backup a MySQL Database (http://www.cpurigs.com/forums/showthread.php?t=2699).

NickT'sGTP
12-13-2006, 10:55 PM
sweet...how late are you going to be on? lol

Greg
12-13-2006, 10:59 PM
sweet...how late are you going to be on? lol

Well, at least 12 more ounces for sure.

NickT'sGTP
12-13-2006, 11:01 PM
great I'm going to grab a bud light and tackle the db backup.

NickT'sGTP
12-13-2006, 11:06 PM
using the command mkdir backup doesn't work

NickT'sGTP
12-13-2006, 11:12 PM
okay it said:

mkdir: cannot create directory 'backup' : file exists.

Greg
12-13-2006, 11:13 PM
I am assuming this is linux.

Perhaps the folder backup exists? Type "ls" to list the directory. It could be permissions too since we're not certain 1005 where you logged into yet.

Greg
12-13-2006, 11:14 PM
okay it said:

mkdir: cannot create directory 'backup' : file exists.

Hehe, I covered that one, saw it coming.

Assuming you made it and it's not public and you want to use that folder, move on to the cd command. You can do an "ls" there to see what is in there.

NickT'sGTP
12-13-2006, 11:21 PM
okay I got:
12102006.sql backup c:documents iawbody.sql public_html
12112006.sql backupname.sql forumdb.sql logs www

when I typed in ls

Greg
12-13-2006, 11:23 PM
That looks like a home. cd into backup and see what's there. I see backups in home, but that will get cluttered.

BTW, you can make forum_backup.sql anything.sql you want pretty much.

NickT'sGTP
12-13-2006, 11:24 PM
how do I do that?

Greg
12-13-2006, 11:25 PM
how do I do that?

hehe, which part? I edited check my posts.

NickT'sGTP
12-13-2006, 11:33 PM
what does the cd command do?

Greg
12-13-2006, 11:35 PM
it means change directory. "cd backup" will put you in the backup folder that all ready exists. When there, type "ls" again and see what's there.

NickT'sGTP
12-13-2006, 11:38 PM
okay...I did the ls command inside the 'backup' and it's showing nothing...so it must be empty?

Greg
12-13-2006, 11:39 PM
must be. Now do the backup.

When done, do another ls and see if it's there.

NickT'sGTP
12-13-2006, 11:41 PM
exactly like you have it on the 1st page, just it should say '> backup.sql'

of course me filling in the caps too...

edit: it prompts for a password....do I find that password in the config.php?

Greg
12-13-2006, 11:43 PM
Yes, like in post 2 and replacing the user info and such.

It shouldn't prompt for a password this way. But if you do this, it will.

mysqldump -Q -u DB_USERNAME DB_NAME > forum_backup.sql


On a shared server, this is more secure.

NickT'sGTP
12-13-2006, 11:49 PM
how do I get out of the backup directory to do the command?