Website file and MySQL database backup process ideas for newcomers

888u

Last update at :2024-07-06,Edit by888u

Yesterday, Snail once again encountered a netizen who told him about a server he was using. He accidentally clicked on the hosting provider's panel, causing the server to be reinstalled (this is actually possible), and asked if the data could be restored. This classmate is really similar to the netizens I met several times before. From the time he first purchased a server, to the time he moved his website or created a new website, he didn’t have any backup for months or almost a year (I’m really heartbroken).

The website data he backed up locally was close to a year ago, which is definitely not of much use. At most, the website can be restored, but one year's worth of data is no longer available. I asked him to ask himself whether the service provider provides automatic off-site backup. If so, there is a way. Otherwise, there is no other way. Fortunately, it is not his most important website, so it can be a good idea for him. Remember to back up.

In this article, Snail has a few words about how newcomers must pay attention to regular backup of data when building a website, especially when using a server. After all, some hosting providers are Some provide automatic backup, but of course it depends on the specific hosting provider. Some automatically back up a week's worth of data directly in the cPanel panel.

First, manually back up at any time

We can perform manual backups according to the increase in the amount of data on our website, because some websites do not have a few articles updated in a month, so there is no need for you to back up every day or in real time. For example, we can find a free time at the beginning or end of each month to copy the website files and database and back them up locally.

If the manual backup database is small, you can export it directly through phpmyadmin, or use the mysqldump command (detailed explanation of how to use the mysqldump command to back up and restore MySQL data). For website files, if our WEB comes with visual packaging, then we can package it directly and download it via FTP. If we can only operate with SHELL, we can use the tar or zip command to package and download it. Some netizens directly download the FTP files one by one every time. , the efficiency is too low.

Second, automatically back up the website

Generally, the panels or scripts we use have their own automatic backup functions. For example, we can set up the Pagoda Panel to automatically back up to third-party storage such as Qiniu Cloud, Youpai Cloud, Alibaba Cloud OSS, or FTP space. And can set up automatic backup. You can also consider setting the frequency of automatic backup based on the amount of data.

1. OneinStack comes with local/remote backup website files and database usage methods

2. Junge LNMP one-click WEB environment comes with a backup script to set up scheduled local and FTP remote backup

3. Pagoda panel scheduled website backup to Qiniu/Youpai cloud storage

Of course, some service providers also provide snapshot backup or scheduled snapshot backup, which can be used.

Third, backup data management and persistence

We must manage the website data well after backing it up. Maybe you think there will be no problems for a few months, and then you relax and don't manage it or back it up. Problems may occur later, and then we need it again. It's too late. Regarding the management of backup data, Snail personally recommends that you save the previous backup cycles and do not delete the previous ones every time you back up, just in case we have content that needs to be backed up previously, because sometimes we will frequently adjust the website.

In summary, there is a lot of nonsense. The main thing is to warn newcomers that choosing a virtual host is different from a server. The latter requires regular backup by ourselves. No matter which service provider you are, problems may also occur with the merchant. At the same time, our own operations may also cause server failure or website file loss. Only regular backups can avoid trouble.

Recommended site searches: Telecom host rental, German server, registration-free virtual space local IP address query, host server rental, check IP, top ten free foreign servers, private server rental, domain name registration query, Taiwan host,

Website file and MySQL database backup process ideas for newcomers

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码