Answer the question
In order to leave comments, you need to log in
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
$ mysqldump -u username -p'password' db-name | ssh [email protected] mysql -u username -p'password db-name
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.
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
Redirect mysqldump to local file:
ssh [email protected] "mysqldump -u root -pPasswordGoesHere databasename" > localfile.sql
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".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question