Trying to tar 100GB worth of stuff. Halfway through tar always fails. Need help asap
Hello,
I am trying to tar 100gb worth of stuff, heres how my command looks. Mind you it is centos 6.4: tar czvf /home/stuff . --numeric-owner It always fails about halfway through for some reason. Its not an error it will just randomly freeze for a second on ssh and stop. it stops when the tar file size is around 6GB's |
If it's not an error, and given that a running tar command, even with the verbose option, doesn't necessarily continuously produce output, by what measure are you concluding that it froze?
|
I'm not sure this would cause the symptoms you are seeing, but by any chance is /home/stuff within the tree that is being archived? tar does try to reject attempts to include the archive within itself, but there are situations where it cannot detect that. It is best to put the archive elsewhere, or exclude it explicitly on the command line.
|
Is the end destination . (dot)???? I'd agree that you should make the destination or output location out of the source location.
|
Quote:
|
Quote:
If your intention is to archive your /home/stuff tree, then the command should look something like: Code:
tar czvf --numeric-owner /home/other-location/out-tar-file.tar.bz2 /home/stuff |
Quote:
FWIW, the original location of the "--numeric-owner" option was fine. |
Quote:
What in the world was that envisioned for anyways? Always use numbers for user/group names? So ... from system to system that does ... what? I.e. if a user or number doesn't exist on the other system, the result is the same, and typically when one de-archives it falls under the ownership of the userID extracting the archive, doesn't it? Worse, if the user doesn't exist on another system; however that user number is for a different user ... then? I never even thought to care, but you are correct to point out my syntax; I should've just omitted that argument totally. |
I guess its for nfs(?); the matching 'user id' for nfs shares is done by uid, not username.
|
I liked this.
"edited by muneer123; 05-23-14 at 10:36 AM. Reason: whoopsie daisy" Ok, just for my reference and archival. "‘--numeric-owner’ The ‘--numeric-owner’ option allows (ANSI) archives to be written without user/group name information or such information to be ignored when extracting. It effectively disables the generation and/or use of user/group name information. This option forces extraction using the numeric ids from the archive, ignoring the names. This is useful in certain circumstances, when restoring a backup from an emergency floppy with different passwd/group files for example. It is otherwise impossible to extract files with the right ownerships if the password file in use during the extraction does not match the one belonging to the file system(s) being extracted. This occurs, for example, if you are restoring your files after a major crash and had booted from an emergency floppy with no password file or put your disk into another machine to do the restore. The numeric ids are always saved into tar archives. The identifying names are added at create time when provided by the system, unless ‘--format=oldgnu’ is used. Numeric ids could be used when moving archives between a collection of machines using a centralized management for attribution of numeric ids to users and groups. This is often made through using the NIS capabilities. When making a tar file for distribution to other sites, it is sometimes cleaner to use a single owner for all files in the distribution, and nicer to specify the write permission bits of the files as stored in the archive independently of their actual value on the file system. The way to prepare a clean distribution is usually to have some Makefile rule creating a directory, copying all needed files in that directory, then setting ownership and permissions as wanted (there are a lot of possible schemes), and only then making a tar archive out of this directory, before cleaning everything out. Of course, we could add a lot of options to GNU tar for fine tuning permissions and ownership. This is not the good way, I think. GNU tar is already crowded with options and moreover, the approach just explained gives you a great deal of control already. " https://www.gnu.org/software/tar/man...ttributes.html |
All times are GMT -5. The time now is 07:20 AM. |