Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Steps to back up MySQL on a Linux network

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "the steps of Linux network backup MySQL". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1. Local backup

Using mysqldump for backup is very simple. If you want to back up the database "phpbb_db_backup", use the command:

# mysqldump-u-p phpbb_db_backup > / usr/backups/mysql/ phpbb_db_backup.2005.5.6

You can also use the gzip command to compress backup files:

# mysqldump phpbb_db_backup | gzip > / usr/backups/mysql/ phpbb_db_backup.2005.5.6. Gz

Use the command to restore data:

# mysql-u-p phpbb_db_backup / mnt/backup_share/ phpbb_db_backup.2005-5-6

two。 Back up over the Samba network

The core of Windows network sharing is SMB/CIFS. If you want to mount disk sharing under linux, you must install and use samba software package. The vast majority of popular linux distributions already contain samba packages, so install samba first if you don't have samba installed when you install linux. Of course, you can also download the samba package from the website, and the latest version is version 3.0.10. Then create a directory (/ arc) on the Windows computer and share it, giving it read and write permissions. Also create a backup_share1 directory under the MYSQL server / mnt directory and mount it:

# mount-t smbfs-o username=cjh, password=XXXX / / 192.168.1.18/arc / mnt/backup_share

Finally, use the command to make a backup:

# dump phpbb_db_backup > / mnt/backup_share/ phpbb_db_backup.2005-5-6

This is the end of the content of "steps for Linux Network backup MySQL". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report