In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to achieve backup in ubuntn, the content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
Method 1:
Using respin, the steps are as follows:
Sudo add-apt-repository ppa:sergiomejia666/respinsudo apt-get updatesudo apt-get install respinsudo respin backup backup.iso
Method 2:
1. Download:
Download the corresponding package from http://www.filewatcher.com according to your system version:
The first is remastersys_3.0.4-2_all.deb.
Then choose 1 to download according to your system version of the following application package 2 (you can skip the GUI package under the graphical interface):
Remastersys-gui_3.0.4-1_i386.deb (32-bit)
Remastersys-gui_3.0.4-1_amd64.deb (64-bit)
two。 Installation:
First, enter sudo apt-get install plymouth-x11 on the command line. If there is an error in the lack of support, replace it with: sudo apt-get-f install
If sudo apt-get-f install fails, you need to modify the source.list source
The first method is: 1. Open the ubuntu Software Center on the right side of the computer-- 2. Double-click to enlarge-- 3. Find "Editor" in the upper left corner-- 4. Select "Software Source" and pop-up "Software and updates window"-5. In the "ubuntu software" item, select "other sites"-6. You can choose the best server, or you can choose a source that you think is fast on the left. I like mirrors.163.com--7. Close when finished-- 8. Run sudo apt-get-f install again
The second method is: 1. First of all, search the Internet for the source of your version of Ubuntu-2. Open the terminal and enter the command sudo gedit / etc/apt/sources.list--3. Add directly-- 4. Save and close-- 5. Enter sudo get-apt update to update
Then type sudo dpkg-I remastersys_3.0.4-2_all.deb
After the installation is completed, select 1 according to the following code 2 of your system version (no graphical interface is required to skip):
Sudo dpkg-I remastersys-gui_3.0.4-1_i386.deb (32 bit)
Sudo dpkg-I remastersys-gui_3.0.4-1_amd_64.deb (64 bit)
3. Open the software:
Sudo remastersys-gui (with GUI interface) or sudo remastersys (without GUI interface)
4. Start backup:
Explain the meaning of each option in detail here.
Sudo remastersys backup-- creates a backup of the liveCD/DVD of the system, which contains your personal directory by default
Sudo remastersys backup custom.iso-- creates a backup of the liveCD/DVD of the system and calls it custom.iso, which contains your personal directory by default
Sudo remastersys clean-- clears the temporary directory. If you have made iso before, you can run this option first, otherwise it is not necessary.
Sudo remastersys dist-create an ISO image of the distribution containing your personal directory
Sudo remastersys dist cdfs-- creates a distribution ISO image that does not contain your personal directory
Sudo remastersys iso custom.iso-- creates a distribution ISO image containing your personal directory and calls it custom.iso, in which custom can be changed to whatever name you want.
Usually we choose sudo remastersys backup custom.iso.
5. Complete:
The image of the CD you want to make can be found in / home/remastersys/remastersys.
Copy the image and run the test in the virtual machine
After trying the first two methods, the author found that the small capacity ubuntu system can be perfectly solved, but the backup system has more than 20 GB, and the error is reported after backup by the above two methods, as follows: "The compressed filesystem is larger than genisoimage allows for a single file." (compressed file system is larger than genisoimage allowed) according to netizens' feedback: "4GB limitation is an iso9660 specification, which exists in genisoimage where cdrtools bifurcation exists in debian and ubuntu." So you can try method three or four.
Method 3:
Become a root user first: enter sudo su on the command line
If there is no root user: enter the ssudo passwd password on the command line
Then go to the root directory of the file system (of course, if you don't want to back up the entire file system, you can also go to the directory you want to back up, including the remote directory or the directory on your removable hard drive): cd /
Here is the complete command I used to back up the system:
# tar cvpzf backup.tgz-exclude=/proc-exclude=/lost+found-exclude=/backup.tgz-exclude=/mnt-exclude=/sys /
Let's take a brief look at this command:
"tar" is, of course, the program we use to back up our system.
"cvpfz" is an option for tar, which means "create archive file", "keep permissions" (retain the original permissions for everything), and "use gzip to reduce file size".
"backup.gz" is the file name of the archive file we are going to get.
"/" is the directory we want to back up, in this case the entire file system.
The directory that must be excluded when backing up is given between the file name "backup.gz" and the directory name "/" to be backed up. Some directories are useless, such as "/ proc", "/ lost+ found", "/ sys". Of course, the "backup.gz" file itself must be excluded, or you may get some unreasonable results. If "/ mnt" is not excluded, other partitions mounted on "/ mnt" will also be backed up. You also need to make sure that nothing is mounted on "/ media" (such as CDs, removable hard drives), and if there is anything mounted, "/ media" must also be excluded.
Some people may suggest that you exclude the "/ dev" directory, but I don't think it's appropriate to do so, and the specific reasons will not be discussed here.
Please make sure that the command you typed is what you want before executing the backup command. It may take a long time to execute the backup command.
After the backup is complete, a file called "backup.tgz" is generated in the root directory of the file system, which is likely to be very large. Now you can burn it on DVD or put it in a place you think is safe.
You may see a prompt at the end of the backup command: 'tar: Error exit delayed from previous errors',. In most cases you can ignore it.
You can also use Bzip2 to compress files. Bzip2 has a higher compression ratio than gzip, but it is slower. If the compression ratio is important to you, you should use Bzip2, use "j" instead of "z" in the command, and give the archive file the correct extension "bz2". The complete command is as follows:
# tar cvpjf backup.tar.bz2-exclude=/proc-exclude=/lost+found-exclude=/backup.tar.bz2-exclude=/mnt-exclude=/sys /
Restore the system:
You must be careful when restoring the system! If you don't know what you're doing, you may lose important data. Please be careful!
Go on to the above example. Switch to the root user and copy the file "backup.tgz" to the root directory of the partition.
One of the wonderful things about Linux is that you can restore the system in a running system without having to boot with boot-cd. Of course, if your system has hung up and cannot be booted, you can use Live CD to boot, and the effect is the same. You can also kill all the files in the Linux system with one command, which I'm not going to give here!
Use the following command to restore the system:
# tar xvpfz backup.tgz-C /
If your files are compressed using Bzip2, you should use:
# tar xvpfj backup.tar.bz2-C /
Note: the above command overwrites all files on the partition with the files in the archive file.
Before executing the restore command, please make sure that the command you typed is what you want. It may take a long time to execute the restore command.
When the restore command ends and your work is not finished, don't forget to recreate the directories that were excluded from the backup:
# mkdir proc# mkdir lost+found# mkdir mnt# mkdir sys
Wait
When you restart your computer, you will find that everything has been restored to the way you created the backup!
Method 4:
Use the backup tool that comes with ubuntu:
1. Upper right corner click on setting
two。 System setup
3. Backup
4. Select a folder to save
5. Select a folder to ignore
6. Select storage location
7. Click backup in the overview
8. Finally, use the archive command: tar-cvf file.tar.gz / home/test/* (/ home/test/* represents all the projects under the test folder under your files home directory, file.tar.gz is the file you want to generate, it will be generated in the directory where you execute the command, and the specific directory where the pwd command is executed can be displayed. )
Restore:
1. First copy the archive file to a location on the system, note that the remaining space is at least twice the size of the file, and then unfile to the current directory
2.cd to current directory
3.tar-xvf filename.tar.bz2. / (if not unzipped to the current folder, please remember to add "- C", such as: tar-xvf filename.tar.bz2-C / home/)
4. Finally, use the backup tool that comes with the system to restore.
If the original password error occurs after the recovery reboot (this problem occurs after copying the archive file to another ubuntu system, either the user name and password of the original system settings are the same, or perform the following steps):
1. Turn on the computer and press the Esc key immediately when "Press Esc to enter grub message" appears on the screen.
two。 Then three options appear, and you select "recovery mode" and press enter (see figure 1).
3. Your computer will enter shell from startup, when the command prompt appears, enter "passwd username" the username here is your user name, if you even forget the user name, there is no hurry to find a way, you can first enter "ls / home" to view the user name, and then enter the above command.
4. When prompted, you can enter your new password directly and confirm it again.
5. At this point, type "shutdown-r now" to restart your computer and enter with your new password.
On how to achieve backup in ubuntn to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.