Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Linux Getting Started tutorial: How to backup Linux systems     - Docker: Mirroring and container operations (Server)

- RedHat Linux source code package installation process (Linux)

- STL in the list of erase () method (Programming)

- C # mobile side and PC-side data exchange (Database)

- Java implementation of stacks and queues (Programming)

- NaSC using simple mathematical operations on Ubuntu and Elementary OS (Linux)

- Linux account management add relevant directives (Linux)

- Processor in protected mode of protection (Linux)

- shell script: a key optimization CentOS system (Linux)

- Java class loading order (Programming)

- How to use the beta / unstable version of the software in Debian library (Linux)

- Three strategies to teach you to release the device memory (Linux)

- pkg-config to use (Linux)

- Oracle Incident Packaging Service (Database)

- Modify Linux SSH default port 22 in several ways (Linux)

- DM9000 timing settings (Programming)

- linux smartd [FAILED] appears at startup (Linux)

- Boost notes --Asio - (1) a simple small example of synchronous communication (Programming)

- Linux file permissions chmod chown (Linux)

- Linux remote landing system (Linux)

  Linux Getting Started tutorial: How to backup Linux systems
  Add Date : 2018-11-21      
  In some previous articles, I have repeatedly mentioned often will engage in a Linux system crashes, the backup system is a thing can not be ignored. Because of their superiority Linux systems, backup and restore the system is relatively easy. Mainly in the following areas:

All Linux systems in the form of a file exist, so the backup is a direct copy files; hard disk partition also as a file, so you can directly clone hard drive data.
Linux system comes with many useful tools, such as tar, dd, rsync, etc., backup and restore system does not need to buy or download third-party software.
Linux system in run-time files on its hard disk can be overwritten, so no additional time to restore the system's boot disk. (Of course, the system is completely unable to start this case to hang or require additional boot disk.)
Backup Strategies There are many Linux systems, such as using the dd command to directly clone the hard disk partition:

sudo dd if = / dev / sda1 of = / dev / sdb1
Alternatively, use tar files on the hard disk packing:

cd /
sudo tar cvpzf backup.tgz --exclude = / proc --exclude = / mnt --exclude = / sys --exclude = / backup.tgz /
Restore the system command is:

sudo dd if = / dev / sdb1 of = / dev / sda1
tar xvpfz backup.tgz -C /
But I chose the rsync command. rsync is a very good tool for file synchronization, can be seen from its name, it supports remote synchronization. Of course, my desktop backup system, only need to use its local synchronization on the line. Chose rsync, it is because it has the following advantages:

In the backup and restore process, you can save the file the original time, permissions, soft and hard links and other information;
When the first backup, you need to copy all the files, but when you back up or restore the system again, you only need to copy the modified file.
On how to use rsync, the main reference document is the man rsync, in addition, rsync can also be run as a daemon used to create a backup file server, you can refer to the documentation man rsyncd.conf.

Desktop Backup combat

For my desktop, I chose backup strategy is to use the rsync command to all files on the hard drive (of course, to exclude the contents of / proc and / sys directory) is copied to the U disk. First, use the command df -lh check my computer's system account for how much space

Partition root directory where occupied 14G, and partition / boot directory where it occupies more than 100 M. In fact, Linux system would have been not so bloated, but since I installed a lot of software packages, such as a set of texlive ah what, it takes up so much space. But this is not the thing, anyway, now U disk is cheap, so U disk 32G find the USB 3.0 to back up my system is certainly very pleasant.

New U disk into your computer will be automatically recognized using the mount command with no arguments can view the device file and mount path U disk, using the fdisk command to know the size of the U disk and partition.

U disk is divided into a whole area I do not have opinions, but I do not like it vfat file system, if it was a giant of more than 4G file how to do? so, umount it first, and then use it to re-establish a mkfs.ext3 file system

U disk and then mount up, mount the path / media / youxia / usb.

You can then start the backup, and the backup is my command:

sudo rsync -Pa / / media / youxia / usb / backup_20141216 --exclude = / media / * --exclude = / sys / * --exclude = / proc / * --exclude = / mnt / * --exclude = / tmp / *

Effect after the backup is complete, you can see the entire backup process took 59 more minutes, U-occupied 15G

If the day before the collapse of the system, then only need to use sudo rsync -Pa / media / youxia / usb / backup_20141216 / to restore the system.
- MongoDB 3.0 New Features (Database)
- Linux Hard Disk Partition and file system management (Linux)
- Use 3G wireless network card under Linux (Linux)
- Fedora 22 how to play rmvb mp4 mkv video files (Linux)
- Unix / Linux commonly used to clean up disk space command (Linux)
- Linux system using the command line shutdown or restart (Linux)
- Debian GNU / Linux service list acquisition, shutting down services or run (Linux)
- Python cause yum upgrade error (Linux)
- Linux_Logo - output color ANSI Linux distributions logo command-line tool (Linux)
- Ubuntu Eclipse configuration Gtk + 2.0 libraries (Linux)
- MyEclipse configuration necessary (Linux)
- The Linux disguised as windows to make the system more secure (Linux)
- Windows 7 hard disk installation notes Debian (Linux)
- Python-- for anomalies and reflection of objects articles (Programming)
- Linux system versions organize local root password cracking method (Linux)
- Security Knowledge: redirection command application security (Linux)
- C language header file defines a global variable (Programming)
- Linux System Getting Started Learning: Fix ImportError: No module named scapy.all (Linux)
- Android Custom View password box example (Programming)
- Linux dd command applies amplification SWAP partition (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.