Skip to content

Commit 9235a43

Browse files
authored
Copy edit
1 parent 61320ca commit 9235a43

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

linux/filesystem/backup.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Backups
22

3-
It is highly recommended you keep regular backups of any important files. Backups often shouldn't be limited to user files; they could include configuration files, databases, installed software, settings, and even an entire snapshot of a system.
3+
It is highly recommended that you keep regular backups of any important files. Backups are often not limited to user files; they could include configuration files, databases, installed software, settings, and even an entire snapshot of a system.
44

5-
Here we'll guide you through some backup techniques for your Raspberry Pi system.
5+
Here, we'll guide you through some backup techniques for your Raspberry Pi system.
66

77
## Home folder
88

9-
A sensible way to keep your home folder backed up is to use the `tar` command to make a snapshot archive of the folder, and keep a copy of it on your home PC or in cloud storage. To do this enter the following commands:
9+
A sensible way to keep your home folder backed up is to use the `tar` command to make a snapshot archive of the folder, and keep a copy of it on your home PC or in cloud storage. To do this, enter the following commands:
1010

1111
```bash
1212
cd /home/
@@ -23,30 +23,30 @@ If you have MySQL databases running on your Raspberry Pi, it would be wise to ke
2323
mysqldump recipes > recipes.sql
2424
```
2525

26-
This command will back up the `recipes` database to the file `recipes.sql`. Note that in this case no username and password have been supplied to the `mysqldump` command. If you do not have your MySQL credentials in a `.my.cnf` configuration file in your home folder, then supply the username and password with flags:
26+
This command will back up the `recipes` database to the file `recipes.sql`. Note that in this case, no username and password have been supplied to the `mysqldump` command. If you don't have your MySQL credentials in a `.my.cnf` configuration file in your home folder, then supply the username and password with flags:
2727

2828
```bash
2929
mysqldump -uroot -ppass recipes > recipes.sql
3030
```
3131

32-
To restore a MySQL database from a dumpfile, pipe the dumpfile into the `mysql` command; provide credentials if necessary and the database name. Note that the database must exist, so create it first:
32+
To restore a MySQL database from a dumpfile, pipe the dumpfile into the `mysql` command; provide credentials, if necessary, and the database name. Note that the database must exist, so create it first:
3333

3434
```bash
3535
mysql -Bse "create database recipes"
3636
cat recipes.sql | mysql recipes
3737
```
3838

39-
Alternatively, you can use the `pv` command (not installed by default, so install with `sudo apt-get install pv`) to see a progress meter as the dumpfile is processed by MySQL. This is useful for large files:
39+
Alternatively, you can use the `pv` command to see a progress meter as the dumpfile is processed by MySQL. This is not installed by default, so install with `sudo apt-get install pv`. This command is useful for large files:
4040

4141
```bash
4242
pv recipes.sql | mysql recipes
4343
```
4444

4545
## SD card image
4646

47-
It may be sensible for you to keep a copy of the entire SD card image, so you can restore the whole SD card if you lose it or it becomes corrupt. You can do this using the same method you'd use to write an image to a new card, but in reverse.
47+
It may be sensible for you to keep a copy of the entire SD card image, so you can restore the card if you lose it or it becomes corrupt. You can do this using the same method you'd use to write an image to a new card, but in reverse.
4848

49-
In Linux or Mac, for example:
49+
In Linux or on a Mac, for example:
5050

5151
```bash
5252
sudo dd bs=4M if=/dev/sdb of=raspbian.img
@@ -58,7 +58,7 @@ This will create an image file on your PC which you can use to write to another
5858
sudo dd bs=4M if=raspbian.img of=/dev/sdb
5959
```
6060

61-
These files can be very large, and compress well. To compress, you can pipe the output of `dd` to `gzip` as well to get a compressed file that is significantly smaller than the original size:
61+
These files can be very large, and compress well. To compress, you can pipe the output of `dd` to `gzip` to get a compressed file that is significantly smaller than the original size:
6262

6363
```bash
6464
sudo dd bs=4M if=/dev/sdb | gzip > rasbian.img.gz

0 commit comments

Comments
 (0)