How to move ClearCase view to a new domain? - clearcase

We are in situation where we successfully moved the VOBs from A domain to B domain (ClearCase server is running on Windows and we use one ClearCase server only).
Now we try to change the views permission in order to prevent creating new views, but it seems that they're still on the same domain.
I tried
fix_prot -force -replace ...vws
fix_prot -root -rec -chown -chgrp ...vws
It works good with no errors, but when I try after to see properties, it's still on \username
Can you advice?
We use snapshot views only
Thank you

For snapshot or dynamic views, the fix_prot utility is used like this:
fix-prot -force -rec -chown newUserName -chgrp newGroupe -chmod 775 /path/to/view/storage.vws
fix-prot -force -root -chown newUserName -chgrp newGroupe /path/to/view/storage.vws
I never use -root -rec: always -rec on one side, -root on the other.
Note the two warnings:
It is recommended that ClearCase services on Windows be shut down prior to running the fix_prot utility.
This will ensure that no files are held open by ClearCase processes which otherwise could be skipped during the execution of the utility.
Note: When you run fix_prot, if there are any Additional Groups that were part of the VOBs group list, running this command will remove those groups.
As a result you will need to run the protectvob command to add these additional groups back to the VOB.

Related

Cleartool commands in CCRC server side?

Am using Clearcase Remote Client(CCRC) and do not have admin rights. Original Clearcase supports 'cleartool' command line interface where as CCRC uses 'rcleartool'. Now, there are some trigger scripts to be placed at the vob level by the admin. Whether at the server side, 'cleartool' commands will work or 'rcelartool'? Only for the client it will be'rcleartool' instead of 'cleartool'?
there are some trigger scripts to be placed at the vob level by the admin.
That would use the mktrtype command, which is a cleartool only command (not rcleartool version)
Even the client-side mktrigger has no rcleartool equivalent.
On the server side, an admin would have access to cleartool and can use those two commands.
It is especially important to note that -- in the case of web and automatic views -- triggers do not execute on the "client" host. They execute on the WAN server. This places a number of limitations on what the triggers can do. For example, all interaction has to be through "clearprompt" commands as interactive triggers are not otherwise supported in web and automatic views.
TO directly answer the question as I read it, the triggers would
have to be placed using cleartool commands at the WAN server or some other LAN client.
need to use cleartool commands (or some other LAN-client API) to query ClearCase and not "rcleartool."
would need to ensure that any interactive elements detect they are running beneath the WAN server (CCASE_WEB_GUI EV set to 1), and use clearprompt as appropriate.

Reformat Load fails in Clearcase 7.1.26

This is a follow on from op - Moving Vobs between Win and AIX
Due to the aix and win vob servers sharing resources (common CC reg & Common Admin PVOB on the Aix box) we need to amalgamate these vob servers onto the AIX server as a precursor to our ultimate move to new servers at CC8.
on the Win VOb Server we have locked the vob, run vob_siddump then a reformat dump of the vob.
Then using xcopy we copied the dumped vob.vbs from Windows to AIX vob server run the fix_prot on the new server.
But when we run the reformatvob -load it goes through it's steps Shows "Loader Done" then shows the following errors
Error from vob database /vobstore/vobs/vobname.vbs.
Error Trouble Opening the VOB Database /vobstore/vobs/vobname.vbs,
Error Trouble Loading versioned object base /vobstore/vobs/vobname.vbs.
Because of the shared registry is this due to the existing registry entry and we need to unregister and then rmtag before registering and tagging fresh or do we need to do anything further?
Clearcase logs on aix vob server show:
DB Log - Error process not running on registery specified hostname (old win vob server)
Vob Log - shows unix UID and GID messange and Warning unable to verify mount options in vob tag registry Clearcase Object not found
David, there are a few things you need to do here:
unregister the VOB and remove all the tags that refer to the old server
reregister and retag the vobs at the new location.
If you can't register the VOB, run fix_prot -r -root ... to reset the ownership and try again.
run vob_sidwalk to remap object ownership.
run it again with -recover_filesystem to reset container ownership. Alternatively run checkvob -pool -protections -fix -force {vob storage dir}.
The last step really needed to be started on the Windows side before this started. Essentially, you needed a sid dump file to turn into the map file that the sidwalk needs (unless you want to remap everything to the VOB owner...)
The complete procedure to follow is at Moving VOBs between Operating system types You may want to start fresh from there if you still have the VOB located in the old location.

Sharing temporary files between users

I am building a web application deployment script in PowerShell, and for one task I am trying to create and restore a database from a Sql-Server backup file.
The files end up being in the user's desktop, so when I instruct Sql-Server to restore it, it complains with an 'Access is denied.' error when reading the backup.
RESTORE DATABASE [Acme] FROM DISK = 'C:\Users\matthew\Desktop\my-database.bak' WITH REPLACE
Responds with
Msg 3201, Level 16, State 2, Line 2
Cannot open backup device 'C:\Users\matthew\Desktop\my-database.bak'. Operating system error 5(Access is denied.).
Moving the file to a publicly accessible area like C:\Temp works, as indicated in the following answer: Why can't I read from .BAK files on my Desktop using SQL Express in Windows Authentication Mode
However, C:\Temp is not a standard Windows temp directory. Since I am using PowerShell, I am leveraging .NET libraries, such as using GetTempPath. This ends up pointing to
C:\Users\matthew\AppData\Local\Temp
which still has the same permission problem.
Is there a standard way to get a temporary directory that any local user can access?
EDIT: to clarify, the user matthew and the user that is restoring the backup are different.
It's not uncommon to create a folder C:\Temp as a system-wide temp directory. For a backup/restore scenario you just need a folder that's accessible by both the backup and the restore user, be it a custom folder, a built-in public folder like C:\Users\Public\Documents, or adjusted permissions on a userprofile.
However, from a security point of view it's probably a good idea to create a dedicated folder (e.g. C:\backup) to which only the required users have access, e.g. like this:
$backupDir = 'C:\backup'
$backupUser = 'DOMAIN\userA'
$restoreUser = 'DOMAIN\userB'
function New-Ace {
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true)]
[string]$User,
[Parameter(Mandatory=$true)]
[string]$Access
)
New-Object Security.AccessControl.FileSystemAccessRule ($User, $Access,
'ObjectInherit, ContainerInherit', 'None', 'Allow')
}
$dir = New-Item -Type Directory $backupDir
$acl = Get-Acl -Path $dir
$acl.SetAccessRuleProtection($true, $false)
$acl.AddAccessRule((New-Ace -User $backupUser -Access 'Modify'))
$acl.AddAccessRule((New-Ace -User $restoreUser -Access 'Read'))
$acl | Set-Acl -Path $dir

Synchronize two vobs on two different hosts

Hi every one am new the clear case I need to keep synchronized the already replicated vobs how do I do that can any one help me in steps wise I appreciate your time and help
Thanks
If the Vob is already replicated (meaning with ClearCase multisite), then it mostly is a matter of running multitool syncreplica:
host1:
multitool syncreplica -export -fship replica:<replica_tag>#\aPVob
host2:
cd /opt/rational/clearcase/shipping/ms_ship/incoming
sudo -u vobadm /opt/rational/clearcase/bin/multitool syncreplica -import /opt/rational/clearcase/shipping/ms_ship/incoming/sync_*_2015-07-16T07*

Removing ClearCase vobs

We have a ClearCase server installed on Solaris box and there are several vobs replicated in a multi-site environment. Now as this Clearcase server is becoming old we have setup an new Server on Windows and able to bring that new server into multi-site with all the required vobs. Now we would like to remove/decommission the vobs from old solaris box and want to free up the space occupied by those vobs.
Can any one suggest the best procedure to do this and also point us to the links for that procedure?
You can:
follow the technote "Moving a VOB using ClearCase MultiSite", which basically:
creates a replica on the source vob server:
import the replica on the destination vob server:
multitool mkreplica -export -workdir c:\\
[-maxsize 100m] -fship :
#
Import:
multitool mkreplica -import -workdir /var/tmp/doesntexist/ -tag
/your/new/vobtag/ -stgloc -auto -npreserve -public /var/adm/atria/
shipping/ms_ship/incoming/
simply rmtag and unregister the vob on the solaris box, in order to remove it completely from the central registry server.
See "How to remove a VOB or View from the ClearCase registry"
The alternative, to delete that vob, and to follow "Deleting a replica"
Then you can simply delete the vob and get back that disk space.

Resources