News:

Wondering if this will always be free?  See why free is better.

Main Menu

Back up of DB not working, help please

Started by adapa, July 20, 2015, 06:43:05 PM

Previous topic - Next topic

adapa

i just migrated my forum to a new url yesterday with a clean file install.  I am now trying to do a back up of the data base via my c panel.

it's timing out. not even throwing an error so i can track it down.  At this point I'm just looking for a general direction on where to look for the problem

thank you for looking

Database server

    Server: sql5c1d.megasqlservers.com via TCP/IP
    Server type: MySQL
    Server version: 5.5.32-log - MySQL Community Server (GPL)
    Protocol version: 10
    User: XXXXXXXXXXXXXXXX
    Server charset: UTF-8 Unicode (utf8)

Web server

    Apache
    Database client version: libmysql - 5.1.70
    PHP extension: mysqli Documentation

phpMyAdmin

    Version information: 4.0.5

Illori

why not upload the backup to your server and ask your host to import it for you?

adapa

i am asking my host to do a back up for me. The DB is currently working i need to be able to do db back ups myself.

if they can do the back up that'll tell me something...

Sir Osis of Liver

How large is the database?  Have you cleared logs?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

adapa

yes, the logs have been cleared via the in smf method in forum maintance

the db was abt 363MB


Sir Osis of Liver

phpmyadmin will timeout without error on some hosts if db is large, server is slow, or you have a slow connection.  Some hosts have a cpanel backup that allows you to save a backup to a directory on the server, and restore or import it from there.  You can use a third party utility like MySQLDumper to backup/restore a large db.  It basically uses a recursive loop to d/l the backup in little bits to circumvent timeouts.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

adapa

In my second call to my hosting, i was informed that my acct doesn't have access to the Data Base Manager so therefore i can't do back ups.

i'll get that turned on tomorrow am. if it solves it, i'll mark this as solved.

ziycon

You could create a batch file on your local machine and put the below into it, then you can run the file whenever you need to back up your database.

mysqldump -u{username} -p{password} -h{host} {database_name} > datadump.sql

You'll also need to make sure that your local IP is allowed/white listed to access the database server.

*N.B. - Its not good practise to store your password anywhere so you can leave your password out and run the batch file from the command line and it will prompt you for the password each time your run the script.

a10

2.0.19, php 8.0.23, MariaDB 10.5.15. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

Illori

Quote from: adapa on July 20, 2015, 11:44:04 PM
In my second call to my hosting, i was informed that my acct doesn't have access to the Data Base Manager so therefore i can't do back ups.

i'll get that turned on tomorrow am. if it solves it, i'll mark this as solved.

why the heck would you use a host that does not give users access to the database when they are a host with php on their server?

i bet that was a BS reply from them as they did not understand your request. maybe time to find a new host before setting up with this one.

adapa

first the lack of DBManager was an over-site. once turned on it did not allow the download.

My host was able to do a back up this morning via the command line method. 
Looks like either the mysqldump or command line method will be my preferred method.

as soon as i verify that the mysqldump works or doesn't i'll post here & mark this as solved


aegersz

phpMyAdmin's database export is my fave. i swear by it, it's a manual backup to an automatic backup but it's reliable.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

adapa

That's been my go to for years

It's why it is so frustrating

I need to learn how to install  the myphpdump or do the command line method.

aegersz

myPhpAdmin:

● Select "Export" > select database (smf209), tick Add DROP DATABASE, tick "Save as file" then hit [GO].

● Select "File to import" > navigate-to-the-export then [GO]
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

margarett

Quote from: aegersz on July 23, 2015, 08:04:05 AM
myPhpAdmin:
● Select "File to import" > navigate-to-the-export then [GO]

With this:
Quotethe db was abt 363MB
The vast majority of servers will fail one way or another ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

aegersz

you said "the db was about 363MB"

i have hourly mysqldump's going too. wow. that database is HUGE !

ok, time to learn mysqldump restores, too. nice reminder for me, thanks.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Kindred

???   that database is tiny.  several of the sites I work on have a database of over 2 gigabytes...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

a10

QuoteMySQLDumper uses a proprietary technique to avoid this problem. It only reads and saves a certain amount of data, then calls itself recursively via JavaScript and remembers how far in the backup process it was. The script then resumes backing up from that point.

It works. (& if happy with it, consider a donation to it's skilled creator)
2.0.19, php 8.0.23, MariaDB 10.5.15. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

adapa

#18
Quote from: aegersz on July 23, 2015, 08:04:05 AM
myPhpAdmin:

● Select "Export" > select database (smf209), tick Add DROP DATABASE, tick "Save as file" then hit [GO].

● Select "File to import" > navigate-to-the-export then [GO]

that's how i've had to back up my DB
but now for some reason since the move to a new url it's no longer working hence coming here & asking for help

trying to get mysqldumper to work
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)


eta
i think this might be the answer thx to googlefu
Quote

Just edit /etc/my.cnf Add following lines to my.cnf

[mysqld]

socket=/var/lib/mysql/mysql.sock

[client]

socket=/var/lib/mysql/mysql.sock

Restart mysql and connect again

    mysql -u user -p password database -h host;
but i need to learn how to do it

LiroyvH

@adapa:
That error usually indicates the mySQL server is down, not necessarily that the socket is configured poorly.
The first logical step would be: check if mySQL is even running; if it's not: start the mySQL server, then try again.
If it refuses to start, check the .err file in the mySQL datadir.
If it is running, restart it. If that does restart fine, but it still doesn't work: *then* it's time to check your configuration.

If this is not your own server, contact your hosting provider and ask them to bring mySQL up.
((U + C + I)x(10 − S)) / 20xAx1 / (1 − sin(F / 10))
President/CEO of Simple Machines - Server Manager
Please do not PM for support - anything else is usually OK.

Advertisement: