jpollard |
05-16-2016 08:17 PM |
Quote:
Originally Posted by perbh
(Post 5546499)
I think there may well be a problem (or two) if you copy a 'live' filesystem with just about any method ...
Several years ago I did a live copy - only to find that the /proc filesystem occupied about 1GB while it is empty for a non-live filesystem. Those were in the days when 1GB was a _lot_ of diskspace. Ever after that - I boot from a usb-stick (or live cd/dvd) and copy the now non-live fs to another medium/partition - ne'er had a problem!
What I used was Alan Cox (anyone remember him?) backup-script which was almost the double of PV's above - ie
Code:
(cd $FROM && tar cf - .) | (cd $TO && tar xvpf -)
Note the 'p'-option - kinda important!!
|
That is why you use the --one-file-system option. It will not copy the contents of a mountpoint, but does include the directory used for the mountpoint.
All of my backups are "live". tar will give warnings if a file is being modified. But with the one-file-system option there is no attempt copy /dev (a mountpoint), /var (frequently a mountpoint), /tmp, /proc, /home (if a mountpoint).
Only the contents of the filesystem specified to be copied - in this case, "/".
|