How to copy a Linux File System and maintain a fixed link
Source: Internet
Author: User
How to copy a Linux File System and maintain a fixed link-general Linux technology-Linux programming and kernel information. The following is a detailed description. As my Linux backup system, I have been switching and upgrading/replacing some general serial bus hard disks in my house recently. A 320 billion-byte Linux box is installed in/mnt/backup mode, and there is no space at first. (If you really want to know, it's Lenovo's notebook T43p. Run it with ubento.) This is after I removed 50 billion bytes last night.
I want to replace it with a new 750 billion-byte hard disk and move all the data to the new disk. however, because most of the data includes remote file system snapshots taken by rsnapshot, a large number of fixed links are generated. this step must be very accurate. otherwise, the data cannot be attached to the 750 billion-byte hard disk!
From my past experience in Unix operating systems, I remember that I had done it once. the trick is not to use common suspicious elements: cp, tar, rsync, or mv. instead, it uses dump (unfortunately) or works with find and cpio.
Then you wait for a long time and wait for these things to roll over. At this time, you really hope that you are using a hard disk with an external SATA interface attachment, instead of a general-purpose Serial Bus 2.0 attachment.
The problem is that cpio cannot maintain directory time labels, so I need to think back to how I used to pair dump and restore.
The next time I want to do this, I will never spend so much time designing a solution.
So, is there another way? Or, do you know why cpio cannot properly maintain the time tag of the directory?
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.