This specific content was written 13 years ago.
Please keep this in mind as it may be outdated and not adhering to best-practices.
If you don’t have space to write a dump file, or want to directly send your SQL to another server (without intermediate transfers), using a remotely mounted folder is a way to go.
There are various mounting options such as:
- SSHFS
- NFS
- Windows Shares (SAMBA)
A quick example using SSHFS:
$ sudo sshfs -o rw user@remoteIP:/local_folder_to_mount_to/some_folder / remote_folder_to_mount_to/some_folder
$ mysqldump --user=root --password=your_password database_name >> /local_folder_to_mount_to/some_folder/mysql_dump_file.sql
You will need to install the appropriate packages either using apt or yum (depending on your system).
$ sudo apt-get install sshfs
$ sudo yum install sshfs
Mr. Menelaos Bakopoulos is currently pursuing his PhD both at Center for TeleInFrastruktur (CTiF) at Aalborg University (AAU) in Denmark and Athens Information Technology (AIT) in Athens, Greece. He received a Master in Information Technology and Telecommunications Systems from Athens Information Technology and a B.Sc. in Computer Science & Management Information Systems from the American College of Thessaloniki. Since April 2008 he has been a member of the Multimedia, Knowledge, and Web Technologies Group.
More Posts
Dec 3 2013
MysqlDump directly on mounted remote directory (CENTOS, Linux, Unix)
If you don’t have space to write a dump file, or want to directly send your SQL to another server (without intermediate transfers), using a remotely mounted folder is a way to go.
There are various mounting options such as:
A quick example using SSHFS:
$ sudo sshfs -o rw user@remoteIP:/local_folder_to_mount_to/some_folder / remote_folder_to_mount_to/some_folder$ mysqldump --user=root --password=your_password database_name >> /local_folder_to_mount_to/some_folder/mysql_dump_file.sqlYou will need to install the appropriate packages either using apt or yum (depending on your system).
$ sudo apt-get install sshfs$ sudo yum install sshfsMenelaos Bakopoulos
Mr. Menelaos Bakopoulos is currently pursuing his PhD both at Center for TeleInFrastruktur (CTiF) at Aalborg University (AAU) in Denmark and Athens Information Technology (AIT) in Athens, Greece. He received a Master in Information Technology and Telecommunications Systems from Athens Information Technology and a B.Sc. in Computer Science & Management Information Systems from the American College of Thessaloniki. Since April 2008 he has been a member of the Multimedia, Knowledge, and Web Technologies Group.
More Posts
Related posts:
By Menelaos Bakopoulos • Uncategorized 0