Ubuntu14.04 backup and recovery system tutorial,
After installing Ubuntu, do not forget to install the for linux Firewall and anti-virus software.
Before backing up the system, make sure the system is correct and clean:
My operating System is ubuntu14.04. I don't know if there is a problem with the System or the installed software. Every time I start the System, the System program problem detected problem occurs.
Very upset, close method:
Enable/etc/default/apport as Administrator
# Set this to 0 to disable apport, or to 1 to enable it
# You can temporarily override this
# Sudo service apport start force_start = 1
Enabled = 1
Change the original 1 to 0.
Clean up the system spam of Ubuntu14.04:
First, clear the recycle bin and upgrade the software to the latest version.
The Ubuntu system is different from the file system used by the Windows system. During use or update of the Ubuntu system, no file fragments or spam files are generated, therefore, in Ubuntu, you do not need to consider clearing the system's file spam and file fragments.
If you really want to clean up the Ubuntu system, follow these steps:
1. Press Ctrl + Alt + T to call up the terminal.
2. Enter the following command on the terminal (copy to the terminal window), press enter, enter account password, and press Enter.
Sudo apt-get autoclean (clear old software cache)
Sudo apt-get clean (clear all software caches)
Sudo apt-get autoremove (delete isolated software that is no longer used by the System)
When backing up a Windows system, you may have thought about whether I can put the entire c drive in a ZIP file. This is impossible in Windows, because many files in Windows are not allowed to be copied or overwritten during their running. Therefore, you need dedicated backup tools for special processing on Windows.
Unlike backing up Windows systems, if you want to back up Ubuntu systems (or any other Linux system), you no longer need backup tools like Ghost. In fact, Ghost and other backup tools have poor support for Linux file systems. For example, some Ghost versions can only fully support Ext2 file systems. If you use it to back up Ext3 and Ext4 file systems, you may lose some valuable data.
1. Backup System
How can I back up my Ubuntu system? It's easy to use TAR just like backing up or compressing other things. Unlike Windows, Linux does not limit root access to anything. You can throw everything in the partition to a TAR file!
Backup Step 1: open a terminal and run sudo su (enter the password after you press Enter)
Step 2: continue to enter cd/in the terminal (note that there is a space in the middle)
Step 3: (start the backup system)
Enter:
# Tar cvpzf Ubuntu. tgz-exclude =/proc-exclude =/lost + found-exclude =/Ubuntu. tgz-exclude =/mnt-exclude =/sys/
Let's take a simple look at this command:
'Tar 'is a backup program.
C-create a backup document
V-verbose mode. The tar program outputs all information on the screen in real time.
P-Save the license and apply it to all files.
Z-use 'gzip 'to compress the backup file to reduce the size of the backup file.
F-indicates the path where the backup file is stored. Ubuntu. tgz indicates the backup file name in this example.
"/" Is the directory to be backed up. Here it is the entire file system.
The directories that must be excluded during Backup are provided between the file name ubuntu.gz and the directory name "/" to be backed up. Some directories are useless, such as "/proc", "/lost + found", and "/sys ". Of course, the ubuntu.gz file must be excluded, otherwise you may get some results beyond common sense. If "/mnt" is not excluded, other partitions mounted on "/mnt" will also be backed up. In addition, make sure that "/media" does not mount anything (such as a CD or a mobile hard disk). If there is a mount, "/media" must also be excluded.
Some people may suggest you exclude the "/dev" directory, but I think this is very inappropriate. The specific reason is not discussed here.
Before executing the BACKUP command, check whether the command you typed is what you want. It may take a short time to execute the BACKUP command.
After the backup is complete, a file named "Ubuntu. tgz" will be generated in the root directory of the file system. The file size may be very large. Now you can burn it to a DVD or put it somewhere you think is safe.
You can also use Bzip2 to compress files. Bzip2 has a higher compression ratio than gzip, but it is slower. If the compression rate is important to you, you should use Bzip2, replace "z" in the command with "j", and give the file a correct extension "bz2 ". The complete command is as follows:
# Tar cvpjf Ubuntu.tar.bz2-exclude =/proc-exclude =/lost + found-exclude =/Ubuntu.tar.bz2-exclude =/mnt-exclude =/sys/
2. Restore the system
Switch to the root user and copy the file "Ubuntu. tgz" to the root directory of the partition.
One wonderful thing in Linux is that you can restore the system in a running system without using boot-cd for special guidance. Of course, if your system has crashed and cannot be started, you can use Live CD to start it. The effect is the same.
Run the following command to restore the system:
# Tar xvpfz Ubuntu. tgz-C/
If your archive file is compressed using Bzip2, use:
# Tar xvpfj Ubuntu.tar.bz2-C/
Note: The preceding command overwrites all files in the partition with files in the archive file.
Parameter x tells the tar program to decompress the backup file. -The C parameter specifies the directory to which the tar program is extracted. (In this example, yes/). This takes a while. Just make sure that you re-create the directories you excluded before you do anything else: (/proc,/lost + found,/mnt,/sys, and so on .)
# Mkdir/proc/lost + found/mnt/sys
Or:
# Mkdir proc
# Mkdir lost + found
# Mkdir mnt
# Mkdir sys
Before executing the recovery command, check whether the command you typed is what you want. It may take a short time to execute the recovery command. When you are familiar with the above operations, you can regularly back up users and some upgraded files to save a lot of time and improve security.