Raspberry Pi backup and Raspberry Pi backup
We strongly recommend that you regularly back up important files. Backup is usually not limited to user files, but also configuration files, databases, installed software, settings, and even system snapshots.
Here we will guide you through some backup technologies to back up your Raspberry Pi system.
Home folder (Home Directory)
A better method for backing up the Home directory is to useTarCommand to generate a directory snapshot compressed file, and then copy it to your PC or cloud storage. Run the following command to back up the home directory:
cd /home/tar czf pi_home.tar.gz pi
Here, a tar compressed file named pi_home.tar.gz is created under the/home/directory. You can copy the file to another device on a USB or network.
MYSQL
If you use the MySQL database on Raspberry Pi, it is also important to back up the database. Back up a single database, you can useMysqldumpCommand:
mysqldump recipes > recipes.sql
To restore a database from a backup file, you need to import the backup file in mysql and provide the certificate (if needed) and database name.
Note that the database must already exist, so create it first:
mysql -Bse "create database recipes"cat recipes.sql | mysql recipes
In addition, you can also use the pv command (not installed by default, you need to useApt-get install pvCommand installation) view the progress of MySQL's backup file processing. This is useful for large files:
pv recipes | mysql recipes
Sd card image (sd card image)
You may need to back up the entire SD card image so that you can recover to the new SD card when the original SD card is lost or damaged. You can back up the SD card by writing the image to the SD card, but in reverse order.
On Linux or Mac systems, for example:
sudo dd bs=4M if=/dev/sdb of=raspbian.img
An image file will be created on your PC. You can write the image file to another SD card to copy the same content and settings. Recover or copy to another SD card.DdCommand, but in turn:
sudo dd bs=4M if=raspbian.img of=/dev/sdb
For more information, see installing SD card imagers.
AUTOMATION)
You can write a Bash script to automate the execution of these backup operations, or even use cron to regularly execute these operations.
Address: http://www.raspberrypi.org/documentation/linux/filesystem/backup.md
How Can I copy the SD card on Raspberry Pi to another SD card?
Read it with win32diskimage and write it again. I will back up the system.
How is Raspberry Pi used? It's not easy to use. Please tell me if you have used it. Thank you.
What I said upstairs is wrong. There are only two types of real Raspberry Pi, namely, B. What is the second generation. Raspberry Pi said that it is a computer rather than a development board. It is too weak only when a LINUX computer is used. When a Sina homepage is opened, it will be stuck and a microblog will crash.
I personally think Raspberry Pi is designed for people who want to play and can play single-chip microcomputer. It is more powerful than single-chip microcomputer and has unlimited scalability than PC.
For example:
For Android PCs, the TV is converted into a tablet without touch and no extension;
Single-Chip Microcomputer (51, ARDUINO, and so on) can automatically close windows in the rain;
Raspberry Pi not only helps you close the window, but also "It's raining! Close the window !".
So if you only want to watch web pages and watch movies on TV, then Raspberry Pi is not your dish. Instead, buy the 'box.