I
I
Igor2012-07-03 11:05:52
Database
Igor, 2012-07-03 11:05:52

How to merge a copy of the database from the VPS if there is little space left on the virtual partition?

Situation: a VPS with a project is available on the Internet via direct IP. It was made by some developers, now they must be accompanied by others. It is necessary to make a copy of this project on a local computer, raise it on local virtual machines and debug everything there. The project itself consists of PHP scripts and data in MySQL. There is no problem copying scripts: we connected via ssh and leaked everything. But merging data from the database is a problem: we connected via the mysql console client and tried to make an archived copy of the database. But an error occurred: there is no space on the virtual disk. How in a current situation it is possible to merge a DB?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
T
TrueDrago, 2012-07-03
@TrueDrago

$ mysqldump -u username -p'password' db-name | ssh [email protected] mysql -u username -p'password db-name

I think this is the easiest option .

J
jaredhared, 2012-07-03
@jaredhared

You can just slow down the sql service on the vps and merge the binary files of the database anywhere. Quickly, cheaply and cheerfully, the main thing is to slip a version of MySQL from later that is not lower than the one that was.

L
Lev Lybin, 2012-07-03
@lybin

1. try to clear the package cache, there will suddenly be enough space after, google under your distro like, apt-get clean, pacman -Scc
2. install the utility and mount some kind of ftp

T
TheMengzor, 2012-07-03
@TheMengzor

Redirect mysqldump to local file:
ssh [email protected] "mysqldump -u root -pPasswordGoesHere databasename" > localfile.sql

N
Nikolai Vasilchuk, 2012-07-03
@Anonym

Easiest way: use SQLyog. Works in Windows and under Wine (without dancing with a tambourine).
We connect to the local database and to the database on the server (if there is no direct access, we can use the SSH tunnel or the HTTP tunnel). Choose something like "Copy Database to Different Host".

E
Elkaz, 2012-07-03
@Elkaz

Master-slave replication, I think it will help you. You make this server as a master, make the local server a slave. And set to sync. Then you turn it off.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question