|
|
How do I copy or archive protected files?
|
|
|
|
Fresh-Faced Recruit
Join Date: Feb 2003
Status:
Offline
|
|
I've periodically run into trouble doing tasks like the following:
1) Archiving big folders fails upon hitting certain protected files.
3) For example, stuffing failed for the Previous System folder created by a Tiger upgrade (my intent was to stuff and delete to see whether any of these files were still needed).
3) Ditto trying to copy such folders to an external FAT32 hard drive.
What am I missing? What is a reliable method for backing up or archiving selected folders without risk of aborting in the middle if a protected file is encountered?
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status:
Offline
|
|
Use cp at the command line instead of some pansy GUI thing?
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Nov 2005
Status:
Offline
|
|
Originally Posted by mduell
Use cp at the command line instead of some pansy GUI thing?
Yes, but you might have to add the sudo command to execute the command as the root user. If you are using those "pansy GUI" applications, you might have never activated the root user. If so, you have to activate it (once) by running the NetInfo program, which is in the Applications/Utility folder. Look under the Security menu and run "Activate root user". DO NOT FORGET THE PASWORD!!!
Now you can open a Terminal window (look in the Applications/Utilities folder) and run a command like:
sudo cp /somefolder/somefile /destinationfolder
You might also read about the tar command and practice using it. To copy to another drive, you might need to enter the drive name as [YY]/Volumes/VolumeName[/TT]. If you type a few letters of the folder name and hit the escape key, the computer will try to complete typing the folder name for you if it can.
|
Mac Pro Quad: 2.66GHz; 4 GB Ram; 4x500GB drives; Radeon X1900, 23" Cinema Screen, APC UPS
PowerBook G4: 1.33GHz; 768MB Ram; 60GB drive
|
|
|
|
|
|
|
|
Senior User
Join Date: Jul 2002
Location: Arizona Wasteland
Status:
Offline
|
|
Originally Posted by rehoot
Yes, but you might have to add the sudo command to execute the command as the root user. If you are using those "pansy GUI" applications, you might have never activated the root user. If so, you have to activate it (once) by running the NetInfo program, which is in the Applications/Utility folder. Look under the Security menu and run "Activate root user". DO NOT FORGET THE PASWORD!!!
Now you can open a Terminal window (look in the Applications/Utilities folder) and run a command like:
sudo cp /somefolder/somefile /destinationfolder.
Um, you don't need to activate the root user to either 'sudo [command]', or 'sudo su'.
Back to the original question. By stuff, I hope you don't mean use an application with Stuffit in its name. If so stuff stuffit in the trash.
Previous System Folder, resulting from an archive install, means just that. Previous as in not being used anymore.
If you 'must' copy your system files use an application like SuperDuper or Carbon Copy to do it.
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Feb 2003
Status:
Offline
|
|
Thanks for the suggestions. I just tried "cp -r" from the Terminal window to copy the Previous Systems folder prior to deletion. However, it's emitting a series of jive warning messages such as:
cp: Previous System 1/var/root: Permission denied
cp: Previous System 1/var/run/sudo: Permission denied
cp: Previous System 1/var/run/netinfo_local.pid: Permission denied
cp: Previous System 1/var/run/pppconfd: Operation not supported on socket
cp: Previous System 1/var/spool/clientmqueue: Permission denied
cp: Previous System 1/Library/Java/Home/bin/javaws: No such file or directory
cp: Previous System 1/Library/Caches/Desktop Pictures/alia.4270840: Permission denied
etc., etc.
This behavior is not unlike my reported problems using other methods, although at least cp proceeds to completing and gives a full log of all skipped files. But the end result is the same: an incomplete and unusable backup copy.
I've just downloaded Carbon Copy Cloner and will see what it has to offer. But is what I'm trying to do so unusual... just trying to move junk on and off my hard drive in a recoverable manner?!? I'm not even mucking with the System folder, or trying to touch files that are in use by other programs!
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Feb 2003
Status:
Offline
|
|
Okay, sudo is what I've been missing. Thanks from this Unix novice.
But why in general does the MacOS GUI make it so hard to reliably move a directory to a backup device using standard Finder techniques?
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status:
Offline
|
|
Because some tasks that are seldom performed by people are better handled by the command line or a utility. The Finder is a general purpose, general user tool.
|
"The natural progress of things is for liberty to yield and government to gain ground." TJ
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Nov 2005
Status:
Offline
|
|
Originally Posted by solmaker
Okay, sudo is what I've been missing. Thanks from this Unix novice.
But why in general does the MacOS GUI make it so hard to reliably move a directory to a backup device using standard Finder techniques?
You can use DiskUtility to make backup copies of folders or your entire disk. It will prompt you to enter the root user ID if it needs to copy protected files. Depending on what you are doing with the files, you might need to use the other applications (such as if you want to send files to a Windows user).
|
Mac Pro Quad: 2.66GHz; 4 GB Ram; 4x500GB drives; Radeon X1900, 23" Cinema Screen, APC UPS
PowerBook G4: 1.33GHz; 768MB Ram; 60GB drive
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Feb 2003
Status:
Offline
|
|
I don't see in Disk Utility where one can selectively backup selected folders... only whole disks. Where is the menu selection for backing up a folder? Also, once backed up, I'm not sure that Finder would permit "protected" files to be deleted off the hard disk.
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Nov 2005
Status:
Offline
|
|
Originally Posted by solmaker
I don't see in Disk Utility where one can selectively backup selected folders... only whole disks. Where is the menu selection for backing up a folder? Also, once backed up, I'm not sure that Finder would permit "protected" files to be deleted off the hard disk.
Look under the Images menu, then choose "New" and then "New Image from folder." It will create a .dmg file. You can also choose encryption to make it secure.
You can also use Disk Image to create a blank, read/write disk image that is encrypted. You can then put your private information there and open it only when you need that info--be sure to pick a strong password. This way, if you have to send your computer for service, the repair person can't see your banking info or other private files.
|
Mac Pro Quad: 2.66GHz; 4 GB Ram; 4x500GB drives; Radeon X1900, 23" Cinema Screen, APC UPS
PowerBook G4: 1.33GHz; 768MB Ram; 60GB drive
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Mar 2004
Status:
Offline
|
|
Originally Posted by solmaker
3) Ditto trying to copy such folders to an external FAT32 hard drive.
What is a reliable method for backing up or archiving selected folders
without risk of aborting in the middle if a protected file is encountered?
Yup... that's right.
See: man ditto
|
-HI-
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Feb 2003
Status:
Offline
|
|
Thanks, Disk Utility was the ticket. BTW, sudo cp strangely created a folder that was 1.5 times the size of the original folder.
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status:
Offline
|
|
Originally Posted by solmaker
Thanks, Disk Utility was the ticket. BTW, sudo cp strangely created a folder that was 1.5 times the size of the original folder.
Got symlinks?
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Mar 2004
Status:
Offline
|
|
FWIW,
I believe that -- under the hood -- both Disk Utility and Carbon Copy Cloner
do [or did?] use /usr/bin/ditto as their copying "engine"... whereas, the folks
at Shirt Pocket wrote their own:
/SuperDuper!.app/Contents/MacOS/SDCopy
|
-HI-
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Feb 2003
Status:
Offline
|
|
mduell - I don't know whether there were symlinks in the Previous Systems folder created after upgrading to Tiger (and now I've deleted that folder after compressing to a disk image so I can't easily check). Are you saying that any such alias are expanded by cp to its full original? BTW, it seems that the only thing in Previous Systems which was actively in use were two CanoScan drivers that were automatically installed when I long ago connected to a USB scanner. Annoyingly, together they were using up 1% of physical memory and 0.2% of CPU just sitting there doing nothing with no scanner is use.
Hal Itosis - Is ditto better or worse than SuperDuper's method?
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Dec 2000
Status:
Offline
|
|
I doubt they "wrote their own" - they're probably just copying files using the normal file system APIs. Carbon Copy Cloner is limited in that regard, because it's just an AppleScript, not a full-blown app. The separate binaries just contain the portions of the app that need to run as root (that way, the main application can launch them with administrative privileges and communicate back and forth with them).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|