![]() | ![]() |
| ||||
| Hi Folks, How do i use SSH to connect to a server to backup a MySQL DB. I am using a Windows machine and want to connect to a Hosting365 account to backup a database. From reading up, i have downloaded the program Putty and entered correct Host name etc. but i am getting connection refused. Is Putty the correct program to use? Am i on the right track. Thanks, S |
| |||||
|
__________________ my sites : irish poker / irish jobs / seo faq / advertise jobs free / green card / skiing |
| ||||
| Thanks Paul I found those commands from searching online earlier but my problem is actually getting into a Shell command environment. Hosting365 enabled Shell on my account earlier but when i run Putt now with correct login account, the Putty Window just disappears after entering login password Any idea? |
| |||||
| Sounds like a wrong password/user really. If you are getting prompted for your user and pass then your connection is ok but some severs will force a client close on entering a wrong user pass combo as a security feature. I'd contact h365 and confirm you are using the right user and password, they may not be the same as your account login.
__________________ Last edited by Frodo; 05-01-2008 at 01:12 AM. Reason: spelling |
| |||||
| also change your putty settings to not close the window on exit ... might give you a useful bit of info
__________________ Forbairt Media | Web Design & Development Galway / Dublin, Ireland - coming soon ... ( vague but descriptive isn't it ) Recent Work: Safari Club African Safari Holidays - South Africa Safaris Other Stuff: FluffyLinkulator Rapid Inclusion Service Tools |
| ||||
| Thanks guys. Managed to login over SSH with putty but still having problems. I have a few domains in my account. Do i need to CD into a certain directory. I am trying to use this command mysqldump -u username -pPassword Databasename > /hsphere/local/home/Webserver/bckdb/test.sql to backup my MySQL DB but getting the following error: Got error: 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) when trying to connect Any ideas? |
| |||||
| I run this (extract only) on a cron to do daily back ups, I change to the directory I'm backing up to first thats only difference to yours, oh and no space between -u and username (thought thats probably just a typo here). But this might help you. Code: #!/bin/bash # backup.sh by Ciaran # file paths ECHO=/bin/echo LS=/bin/ls DATE=/bin/date # script variables DATECODE=`date +%Y-%m-%d` BACKDIR=/media/WD1/backUp/ # do the work $ECHO `date` ":-- ==== starting backup ==== --" ############################################### cd "$BACKDIR" mkdir "$DATECODE" $ECHO `date` ": Web Files Backup" cd /srv zip -r srv * >> /log.log mv srv.zip $BACKDIR/$DATECODE $ECHO `date` ": Apache Setup Backup" cd /etc/apache2 zip -r apache * >> /log.log mv apache.zip $BACKDIR/$DATECODE $ECHO `date` ": MySQL backup" cd $BACKDIR/$DATECODE mysqldump -uusername -ppassword databasename > databasename.sql
__________________ |
| |||||
| Quote:
__________________ Forbairt Media | Web Design & Development Galway / Dublin, Ireland - coming soon ... ( vague but descriptive isn't it ) Recent Work: Safari Club African Safari Holidays - South Africa Safaris Other Stuff: FluffyLinkulator Rapid Inclusion Service Tools |
| |||||
| Quote:
__________________ Forbairt Media | Web Design & Development Galway / Dublin, Ireland - coming soon ... ( vague but descriptive isn't it ) Recent Work: Safari Club African Safari Holidays - South Africa Safaris Other Stuff: FluffyLinkulator Rapid Inclusion Service Tools |
| Thread Tools | |
| Display Modes | |
|
|
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| changing permissons via ssh | Cormac | Server / Technical Administration Tips and Queries | 5 | 15-08-2006 11:29 PM |