How Do We Upload Large-Sized SQL Files?
I want to write this topic because I see the lack of an explanatory article on this topic, and this topic makes up the bulk of the problems in this category.
Database backup & restore using ssh
you need to change the following variables according to yourself.If you don't know the exact path address of your site, send the following php code to the main directory of your site _SERVER["********_ROOT"]. Find the data in the variable
you need to change the following variables according to yourself.If you don't know the exact path address of your site, send the following php code to the main directory of your site _SERVER["********_ROOT"]. Find the data in the variable
PHP:
<? phpinfo() ?>
First, how do we back up the Database.
If we have our own certificate machine, the command we need to type is for ssh:
If we have our own certificate machine, the command we need to type is for ssh:
PHP:
mysqldump --default-character-set=latin5 -u username -p usurnamepassword sqlname> dbyedek.sql
after completing the backup process, we need to compress this file to download it to our computer.The command we need to type in this is:
PHP:
tar -czf dbyedek.tgz dbyedek.sql
we need to copy this compressed file to the FTP directory of our site so that we can connect and download it to our computer using the ftp program.
PHP:
cp dbyedek.tgz /home/r10net/public_html/
with cuteftp, we can't download this file right now because the only person authorized to download it is root for now.To do this, we need to change the owner property of the file.In it, we use the following command.
PHP:
chown -R r10net /home/r10net/public_html/dbyedek.tgz
now we can take a backup of our database and download it to our computer with the cuteftp program and store it conveniently.
If it is necessary to upload this file again in the future, the command we need to enter with ssh and use is:
If it is necessary to upload this file again in the future, the command we need to enter with ssh and use is:
PHP:
mysqldump --default-character-set=latin5 -u kullaniciadiniz -p kullanicisifreniz veritabaniadiniz < dbyedek.sql
Backup and restore with phpmyadmin
If you are using share hosting, you can make a database backup with phpmyadmin. Sometimes it becomes a complete Chinese torture to upload this backup file that you have made to another host again.
Although there are not many useful programs on the market that can save us from this state of Chinese torture. I have tried almost all of these programs, and I would like to share the most useful one on the forum.
Download the attached file and install it on your computer. Upload your database backup to the program.This program systematically divides our database into parts without problems.
for example, by dividing your 200mb database into 10 equal parts, you can send it to your new hosting very easily without having a timeout issue.
Source : Büyük Boyutlu SQL Dosyalarını Nasıl Yükleriz?