Shirt Pocket Discussions  
    Home netTunes launchTunes SuperDuper! Buy Now Support Discussions About Shirt Pocket    

Go Back   Shirt Pocket Discussions > SuperDuper! > General

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1  
Old 12-02-2005, 02:53 PM
mypointofview mypointofview is offline
Registered User
 
Join Date: Sep 2005
Posts: 41
How to preserve icon of target volume during smartbackup?

I've set up a personalized script, so that the invisible file ".VolumeIcon.icns" should be ignored on the original drive while running "Backup - all files" in Smart Update mode. This works and the target volume does not receive this icon

However, in the same script I have defined also that the icon for the target drive "Volumes / BKUP Macintosh HD / .VolumeIcon.icns" should also be ignored. Yet it gets deleted on the target volume when I do a smart backup

I had selected the icon for the original drive ".VolumeIcon.icns" from the first column in the little browser underneath the "Script Commands" pane.

The icon for the target drive "Volumes / BKUP Macintosh HD / .VolumeIcon.icns" I had selected by first clicking on "Volumes" (left column) which then revealed all mounted drives in a second column. There I selected my target drive, which opened a third column where I finally selected the icon file for the target drive.

So the pane of the scripts commands said:

ignore .VolumeIcon.icns
ignore Volumes/BKUP Macintosh HD/.VolumeIcon.icns

Question: why is the icon on my target volume being deleted and how can I stop this?


Sincerely, Martin.

Panther 10.39, G4 Dual 500, SuperDuper 2.0, all internal drives
Reply With Quote
  #2  
Old 12-02-2005, 03:33 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
By definition, ignore with Smart Update will remove the file. It's ignored *from the source*, not the destination. That means it's not in the set of files to be copied, so it'll be removed instead.

So, here's what you should do:

- Create a folder named "Volume Icons" in your Home.
- In there, place the icon you want, for a given volume, named "the-volume-name.VolumeIcon.icns".
- Download the attached and set it as your "after copy" script in Advanced

That'll automatically set the icon when the backup is done. Note that it depends on having the developer tools installed in most cases (unless the source has a custom icon).
Attached Files
File Type: zip set_icon.zip (302 Bytes, 2930 views)
__________________
--Dave Nanian

Last edited by dnanian; 12-04-2005 at 09:14 PM.
Reply With Quote
  #3  
Old 01-17-2006, 03:30 AM
Aristophanes Aristophanes is offline
Registered User
 
Join Date: Jan 2006
Posts: 1
Altered Icon on Cloned Drive

Hello,

I have the same problem of my cloned drive icon changing after every backup. It is very frustrating.

Unlike the previous questioner, I have done nothing to exempt any files. SuperDuper just started doing it. This did not happen under V.1.

Thanks
Reply With Quote
  #4  
Old 01-17-2006, 08:31 AM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
This behavior hasn't changed between v1 and v2, Aristophanes. The icon is a file like any other, and is copied from the source to the destination.

There's a message "stuck" at the top of the forum that provides a method that should let you reset the icon after you back up, should this be important to you.
__________________
--Dave Nanian
Reply With Quote
  #5  
Old 02-04-2006, 07:14 PM
aaronpcreative aaronpcreative is offline
Registered User
 
Join Date: Feb 2006
Posts: 2
New Icon doesn't show up until log out/in

I followed all the steps above, and it works great except for the fact that the icon doesn't refresh automatically.

Let me suggest a feature here- that it would be nice to have the option, while setting up a dupe, to overlay a tiny indicator to the target volumes' duplicated icon, after copy, so that people wouldn't have to mess with .icns files? I do icons for fun so it's no big deal for me, but when you have several volumes operating, it can get a bit confusing in the finder.
Reply With Quote
  #6  
Old 02-04-2006, 09:42 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
I'm not sure what you mean, Aaron. Where is this indicator displayed?
__________________
--Dave Nanian
Reply With Quote
  #7  
Old 09-19-2006, 10:22 PM
DavidGG DavidGG is offline
Registered User
 
Join Date: May 2006
Location: Barcelona, Spain
Posts: 1
Quote:
Originally Posted by dnanian View Post
- Create a folder named "Volume Icons" in your Home.
- In there, place the icon you want, for a given volume, named "the-volume-name.VolumeIcon.icns".
- Download the attached and set it as your "after copy" script in Advanced
I may be missing something here, but is there a reason why the user should be bothered with maintaining a "Volume Icons" folder? Wouldn't it be better to use a "before copy" script that saves the icon in /tmp, and an "after copy" script that restores it later?

# Save volume icon
if [ -e "$4/.VolumeIcon.icns" ]; then
cp "$4/.VolumeIcon.icns" "/tmp/$3.VolumeIcon.icns"
fi

# Restore volume icon
if [ -e "/tmp/$3.VolumeIcon.icns" ]; then
cp "/tmp/$3.VolumeIcon.icns" "$4/.VolumeIcon.icns"
if [ -e /Developer/Tools/SetFile ]; then
/Developer/Tools/SetFile -a C "$4" # Set "custom icon" flag for volume
fi
rm -f "/tmp/$3.VolumeIcon.icns"
fi

Actually, is there a reason SuperDuper doesn't have an option to do this automatically?

Last edited by DavidGG; 09-19-2006 at 10:24 PM.
Reply With Quote
  #8  
Old 09-19-2006, 10:29 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
When this was written, there wasn't both a before and after script... but this should work fine.

We don't have this in there because we're working on a better way, and it's not a big problem for most people (not enough of a problem to add it to the template)...
__________________
--Dave Nanian
Reply With Quote
  #9  
Old 03-28-2007, 06:53 PM
AzureeWill AzureeWill is offline
Registered User
 
Join Date: Mar 2007
Posts: 2
Question about an icon workaround

Quote:
Originally Posted by DavidGG View Post
I may be missing something here, but is there a reason why the user should be bothered with maintaining a "Volume Icons" folder? Wouldn't it be better to use a "before copy" script that saves the icon in /tmp, and an "after copy" script that restores it later?

# Save volume icon
if [ -e "$4/.VolumeIcon.icns" ]; then
cp "$4/.VolumeIcon.icns" "/tmp/$3.VolumeIcon.icns"
fi

# Restore volume icon
if [ -e "/tmp/$3.VolumeIcon.icns" ]; then
cp "/tmp/$3.VolumeIcon.icns" "$4/.VolumeIcon.icns"
if [ -e /Developer/Tools/SetFile ]; then
/Developer/Tools/SetFile -a C "$4" # Set "custom icon" flag for volume
fi
rm -f "/tmp/$3.VolumeIcon.icns"
fi

Actually, is there a reason SuperDuper doesn't have an option to do this automatically?
Playing with scripts/programming is outside my field of expertise, but I really want my custom drive icons to stay the way I have them, so I'd appreciate it if anyone could answer my questions about DavidGG's script. I too would like to avoid maintaining a "Volume Icons" folder, but am a little sketchy on how to implement DavidGG's workaround.

1) I feel quite ignorant asking, but... if I copy this script off the forum page, what do I do with it? Paste & save in TextEdit or? Do I have to save it in a particular location?

2) Do the custom drive icons have to have been changed in any particular way in the first place in order for this script to do its job? I've simply done the quick copy-paste of the icon image in the Get Info window, didn't use CandyBar or anything.

3) Where it says "$3" and "$4", do I need to change that to match the actual names of my particular volumes? And if so, which one refers to the Target and which one refers to the Source?

Thank you for any guidance you can give!

As other users have stated, I too would appreciate future updates to SuperDuper! to include the option of maintaining custom drive icons. As simple as the little things are to change in the first place, I really don't like having to tinker with programming in order to put them back the way I had them before running a SuperDuper SmartUpdate. I'd prefer to leave the programming to the SuperDuper programmers, so they can implement a clean and elegant solution to the icon issue, just as they've created such a clean and elegant backup solution!
Reply With Quote
  #10  
Old 03-28-2007, 07:01 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
You'd need to create two files -- plain text ones -- with those commands in them. The actual files would be:

saveicon.sh:

Code:
#!/bin/sh

# Save volume icon

if [ -e "$4/.VolumeIcon.icns" ]; then
   cp "$4/.VolumeIcon.icns" "/tmp/$3.VolumeIcon.icns"
fi
restoreicon.sh:

Code:
#!/bin/sh

# Restore volume icon

if [ -e "/tmp/$3.VolumeIcon.icns" ]; then
  cp "/tmp/$3.VolumeIcon.icns" "$4/.VolumeIcon.icns"
  if [ -e /Developer/Tools/SetFile ]; then
    /Developer/Tools/SetFile -a C "$4" # Set "custom icon" flag for volume
  fi
  rm -f "/tmp/$3.VolumeIcon.icns"
fi
These would have to be saved in those files, then each would have to be marked as executable. That would involve a command in Terminal (assuming they're in your Home fodler):

Code:
chmod +x ~/saveicon.sh ~/restoreicon.sh
Thanks for the other comments.
__________________
--Dave Nanian
Reply With Quote
  #11  
Old 03-28-2007, 07:09 PM
AzureeWill AzureeWill is offline
Registered User
 
Join Date: Mar 2007
Posts: 2
Quick followup!

Thanks Dave! I'll save the script as you've instructed ang give it a go. Would you happen to have any answers for my questions 2) & 3)?

SuperDuper is so nice & easy, I may even switch my parents over to it, but I need to resolve this little icon issue first or they will quickly get confused about which drive/partition is which. It's all about the pretty pictures making everything clear for them!
Reply With Quote
  #12  
Old 07-23-2006, 03:54 PM
john love john love is offline
Registered User
 
Join Date: Apr 2004
Posts: 22
Insufficient privileges to change icon???

Reference script to change icon after smart update

the first 2 lines of your script are:

#!/bin/sh
echo "Restoring icon for $3..."

SD chokes on the 1st line because of insufficient permissions ... in this case the destination is a .dmg file which is located on the 1st of 2 partitions of an external drive and obviously I am the administrator.

My second smart backup will probably have the same problem because the destination is on the 2nd of 2 partitions of the same external drive.

Thanks, Dave

John Love
Reply With Quote
  #13  
Old 07-23-2006, 03:58 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
That's because you haven't given the script execute permissions, John. So, in Terminal, you want to do:

chmod +x the-script-file

That should deal with it...
__________________
--Dave Nanian
Reply With Quote
  #14  
Old 08-02-2006, 06:13 PM
john love john love is offline
Registered User
 
Join Date: Apr 2004
Posts: 22
Changing the icon on a sparseimage

Dave:

Thanks again for the chmod +x fix ... but:

(1) for the first scenario I have in my HOME folder this file = "VolumeIcons:LaCie SandBox.VolumeIcon.icns" whose icon is my special icon and this scenario works flawlessly once I did the chmod +x in Terminal.

(2) for the last scenario I have in the same HOME folder this file = "VolumeIcons:iMac_Internal_DU.VolumeIcon.icns" ... but for this scenario I save all files to a sparseimage file = "iMac_Internal_DU.sparseimage" which when double-clicked expands to "iMac_Internal_DU".

okay, when I run SD on #2, the icon of the original volume = "iMac Internal HD" (which is the same as for #1) gets transferred to "iMac_Internal_DU", that is, no special icon?????

HAALP!!
Reply With Quote
  #15  
Old 08-02-2006, 07:18 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
Not quite sure why that would be, but I don't think I considered sparse images when I wrote this. Do you really need your sparse image to have a special icon when mounted, John?
__________________
--Dave Nanian
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot find target volume Timmy General 6 03-13-2006 01:06 PM
maintaining target volume icon yoxi General 43 12-16-2005 09:41 AM
SD sannot find target Volume problem braeside General 7 09-02-2005 03:59 PM
Error while trying to enable permissions on target volume Hoosier_1701 General 11 07-16-2005 11:50 AM
Cannot find target volume -- Even with volume mounted! cmod General 3 06-03-2005 09:21 AM


All times are GMT -4. The time now is 05:39 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.