Yes, we'd tried that without success. I hadn't considered the other file attributes options though. Sadly, it seems no better. A simple test just on CentOS7 gives me this:-
Am I doing something daft? At worst I've scanned all local files and collected the capabilities into a file that then is part of the tarball. On recovery I can apply them within my kickstart file. It's just more steps to wory about.
I have found that simply copying a file loses the capabilities, one has to cp --preserve=xattr source target Maybe I don't understand where these are stored. Maybe I don't need to know, just understand the rules I need to follow
I know I can achieve it with rsync but I can't neatly use that when doing a PXE recovery and I'd have to get the files out to all the remote locations individually too, which would be a nightmare.
I will keep digging. Any other suggestions to explore very welcome.
help please
i have "inherited" a Sco Server (the administrator departed in a hurry...yes we are chasing him..) and haven't used Unix for 8 years.
i have a file that i need to retrieve from a tape.
i have been able to find the file on tape using the cpio -ivt command.
however...
the problem I... (3 Replies)
Can anyone please help...?
Managed to do a ufsdump of files to tape. Having trouble using ufsrestore to pull a single file back by filename??
I have dumped a single file to tape also because looking through the other threads, I noticed that you have to tell it to skip files before you get to... (1 Reply)
Is it possible to restore a TAR'ed file off of a tape to a location other than the original location? If so, how?
(The MAN pages give examples of how to restore only to the originating location.)
Thanks!! (1 Reply)
I'm new to Unix and have just wrote a little program to move files to a recycle bin (a Directory i created) and restore them. The problem is that i need to keep track of all the full filenames so that i can restore them to the right place. I did this by creating a file called delreg and putting the... (4 Replies)
Hi,
Can any one tell me how to restore back the deleted file in unix?
I know the file name.
If i know the inode number of the file does help more to restore back the file? (1 Reply)
Hello everyone,
I am new to unix shell.
I have a file called Path.txt....and i have data in that as
1 abhi
2 avi
3 ash so on.....
1 ,2 ,3 is the... (2 Replies)
Hello I use Solaris 10. I need to restore the root file system, but I don't know how . i can only boot the server in safe mode or with the cd (ok boot cdrom -s)
Do you guys know a good procedure, I don't want to break the mirrors.
( the server is not a cluster).
Its an emergency, i would... (4 Replies)
Hello everyone,
I am attempting to make a recycling bin type application in shell script (tcsh). I have the whole part of the application done where someone can recycle files from one location to the recycling bin (the lower half of the program), this is not a problem. However I wanted to make... (7 Replies)
Is there a way I could recover a deleted text file with "rm -rf" command.
Running CentOS 6.5.
Thank you. (5 Replies)
Discussion started by: galford
5 Replies
LEARN ABOUT OSX
cpmac
CPMAC(1) BSD General Commands Manual CPMAC(1)NAME
/usr/bin/CpMac -- copy files preserving metadata and forks
SYNOPSIS
/usr/bin/CpMac [-rp] [-mac] source target
/usr/bin/CpMac [-rp] [-mac] source ... directory
DESCRIPTION
In its first form, the /usr/bin/CpMac utility copies the contents of the file named by the source operand to the destination path named by
the target operand. This form is assumed when the last operand does not name an already existing directory.
In its second form, /usr/bin/CpMac copies each file named by a source operand to a destination directory named by the directory operand. The
destination path for each operand is the pathname produced by the concatenation of the last operand, a slash, and the final pathname compo-
nent of the named file.
The following options are available:
-r If source designates a directory, /usr/bin/CpMac copies the directory and the entire subtree connected at that point. This option also
causes symbolic links to be copied, rather than indirected through, and for /usr/bin/CpMac to create special files rather than copying
them as normal files. Created directories have the same mode as the corresponding source directory, unmodified by the process' umask.
-p Causes /usr/bin/CpMac to preserve in the copy as many of the modification time, access time, file flags, file mode, user ID, and group
ID as allowed by permissions.
-mac Allows use of HFS-style paths for both source and target. Path elements must be separated by colons, and the path must begin with a
volume name or a colon (to designate current directory).
NOTES
The /usr/bin/CpMac command does not support the same options as the POSIX cp command, and is much less flexible in its operands. It cannot
be used as a direct substitute for cp in scripts.
As of Mac OS X 10.4, the cp command preserves metadata and resource forks of files on Extended HFS volumes, so it can be used in place of
CpMac. The /usr/bin/CpMac command will be deprecated in future versions of Mac OS X.
SEE ALSO cp(1)MvMac(1)Mac OS X April 12, 2004 Mac OS X