Head Pic: 「miku 无视」/「千夜QYS3」のイラスト [pixiv]
It’s obvious that a backup work has great significance for something lost or damaged.
I did got my data back via a backup when I accidently deleted the database.
We need to prepare a second copy of a file, program, database, etc, that can be used if the main one fails.
There are two ways to make a copy of your files: the one is exporting automatically; the other is typing every command by hands.
I chose the former. Though it has a little bit difficulty at first.
- Download it from VPS directly
- Use a backend storage server
Both of them has its advantages and disadvantages.
If you download your files directly from a VPS, the speed will be limited by the bandwidth between the VPS and your computer.(Servers in mainland China usually has only 1M for free, while in US, that can up to 1G.)
So, If your server was located in mainland China, I’ll advise you to choose the latter way.
No bandwidth limited and it just cost a little.
Using Alibaba cloud’s Object Storage Server(oss) as an example.
The first thing you need to do is that mount the oss on your server via ossfs.
More information about the ossfs, please go to this page.
Having completed the first stage, you can move onto Step 2.
Write a script like this:
/home/backup/ossfs is a directory where the oss mounted.
Go to oss control panel to download your files.