Thursday, December 15, 2011

Upgrade of a NetBackup master server to version 7.1.0.2 may cause bmrsavecfg failures at backup time when Bare Metal Restore (BMR) information is being collected.  At backup time, the BMR process runs a bmrsavecfg job that will collect information from the client and submit the data into the BMR database on the master server to be imported. Although this process previously worked prior to the upgrade, there may be failures while the data is being imported into the BMR database.

Error Messages in Job Detail Status:

 BMRERR: Received BMR error: Failed to import Config file. (1) 
Error bpbrm(pid=6456) BMRERR: Received BMR error: Failed sending the discovery. (1) 
Error bpbrm(pid=6456) BMRERR: Received BMR error: BMR information discovery failed. (1)

Symantec TechNote

Wednesday, October 26, 2011

NetBackup Status Code 59

Every now and then some of my Netbackup jobs end with status code 59 which means that the Netbackup master or Media server is not in the client Server allow list.  This usually happens after an Agent upgrade which not a big issue, but annoying none the less.

Message: access to the client was not allowed
Explanation: The master or the media server tries to access the client, but the client does not recognize the server as a valid server.
For the Enterprise Vault Agent: The names of all of the media servers among the Enterprise Vault servers are not specified in the client configuration.
Recommended Action: Do the following, as appropriate:
•    If the server is a valid server, verify that it is in the server list on the client. If necessary add it as follows:
•    1. Open the Backup Archive and Restore Utility on the Windows Client.
•    2. Select File >Specify NetBackup Machines and Policy Type
•    3. On the Specify NetBackup Machines  and Policy Type dialog opens Select Edit Server list and type in the name of Netbackup master or media server that will backup the client up..

Update: I've not had a chance to try this fix but it seems related.  From Symantec How TO articles. 

bpsetconfig

I have also seen this fix for status code (46) I've seen the technote but do not have the link. 
From the Netbackup OppsCenter Help Menu

Tuesday, September 27, 2011

Netbackup: Import Disk Based images

This is the procedure I used to import Netbackup disk based images from a failed media server.  This is a 2 phased method that uses the NBU Admin console.  Phase 1 initiates the import process by locating the path to the images to be imported and the second phases imports the images into the database.  The disk images must be present on a local disk. In my experience network importing from a network share did not work.

Phase 1
Importing NetBackup disk images
First, run the "phase 1 import".
1. Start the NetBackup Administration Console and go to the Catalog section.
2. From the menu select Actions > Initiate Import and a dialog box will appear.
3. Check the "The images to be imported are on disk" radio button and enter a disk path to import images from.
4. Check the Activity Monitor for progress of the phase one import.

Phase 2
Once the "phase 1 import" completes, run the "phase 2 import".
1. Start the NetBackup Administration Console and go to the Catalog section.
2. Under Pathname:, enter the disk path used for the phase 2 import.
3. Select a date range for the images to import and click the Search button.
4. Select Backup IDs to import from the search results.
5. From the menu select Actions > Import to begin the phase 2 import.
6. Check the Activity Monitor for progress of the phase 2 import.

Once the phase 2 import completes successfully, the disk images will be available for restores.


Documentation

Monday, September 26, 2011

VDR: Remove Damaged Restore Points

Remove Damaged Restore Points

Corrupt restore points, which are identified during integrity checks, should be removed. Restore points may be identified as damaged during transient connection failures. If transient connection failures are possible, check if damaged restore point issues are resolved after connections are restored.

Prerequisites
Before you can remove damaged restore points, you must have restore points in a functioning Data Recovery
deployment.

Procedure
1 In the vSphere Client, select Home > Solutions and Applications > VMware Data Recovery.
2 Click the Reports tab and double-click the integrity check that failed.

The Operations Log for the event opens in a separate window. Note which restore points triggered the
failure.

3 Close the Operations Log and click the Restore tab.

4 From the Filter dropdown list, select Damaged Restore Points.
Available restore points are filtered to display only the virtual machines with damaged restore points. It
may be necessary to expand a virtual machine's node to display the damaged restore point.

5 Select damaged restore points for removal and click Mark for Delete.

6 Initiate an integrity check.
Completing an integrity check causes all restore points marked for deletion to be removed.

7 Review the results of the integrity check to ensure no damaged restore points remain.


VMware Data Recovery Administration Guide
28

Tuesday, September 13, 2011

Exchange 2007: Fowad all Mail

This is the Procedure to forward all mail from one Exchange 2007 mailbox to another mailbox without leaving a copy on the original recipient mailbox. 

Exchange management Shell:

Set-Mailbox -Identity "John Smith" -ForwardingAddress "sara@contoso.com"

Use following ccmlet to forward all mail while leaving a copy on the original recipient mailbox. 

Set-Mailbox -Identity "John Smith" -ForwardingAddress "sara@contoso.com" -DeliverToMailboxAndForward $true

Exchange Management Console:

1.   In the console tree, expand Recipient Configuration, and then click Mailbox.

2.  In the result pane, right-click the mailbox for which you want to configure mail forwarding and click Properties.

3.  In <Mailbox> Properties, on the Mail Flow Settings tab, click Delivery Options, and then click Properties.

4.  Click the Forward to check box. This enables the Browse button.

5.  Click Browse to open the Select Recipient dialog box. Select the recipient to whom you want to forward messages, and then click OK.

6.  If you want incoming messages to be delivered to the mailbox as well as to the forwarding address configured, select the Deliver message to both forwarding address and mailbox check box. Clear this check box to forward all incoming messages without retaining copies in the mailbox.

7.  Click OK to return to <Mailbox> Properties.

8.  Click OK.

Wednesday, August 10, 2011

PowerShell Script: Protect OUs from Acidental Deletion

Quick Powershell script to protect all OUs from acidental delition.

Run the following script from the Active Directory Module  to finda all unprotected OUS

Get-ADOrganizationalUnit -filter * -Properties ProtectedFromAccidentalDeletion | where {$_.ProtectedFromAccidentalDeletion -eq $false} | ft


Run the following script from the Active Directory Module to protect all the OUs listed in output from obove scripts.

Get-ADOrganizationalUnit -filter * -Properties ProtectedFromAccidentalDeletion | where {$_.ProtectedFromAccidentalDeletion -eq $false} | Set-ADOrganizationalUnit -ProtectedFromAccidentalDeletion $true

TechNet Article

Wednesday, June 8, 2011

OCS 2007 r2: 3 Way IM Conferencing

A few days ago I got a call from the Helpdesk technicians reporting OCS issues.  It turns out that 3 way IM conference sessions stopped working.  My first thought was to check the status of the OCS services, but they all appeared to be running.  The error displayed in the logs was 3098 which after research turned out to be related to certificate issue.  After I looked at my certificate store I found out that the Certificate was expired.

After reissuing the certificate I continued to get errors (3097) relating to a downed or disabled MCU.  I continued to read many, many forums until I found one which seemed to have the my same issue.  The forum poster had called Microsoft and after a long troubleshooting session they found out that the IM Conferencing Service was being run by the RTCComponentServer rather than the RTCService.  Everything started working after I made the change.

I am still wondering why this stopped working, given that this configuration was set up since the initial setup of OCS 2007 r2.

LCSCMD commands to activate and Deactivate the IM Conferencing on OCS 2007 r2

Activate:
LCSCmd.exe /MCU /Action:deactivate /Role:IMMCU

Deactivate:
LCSCmd.exe /MCU /Action:Activate /Role:IMMCU /Pool01  /Password:OptimusPrime
No need to issue /username if you are logged on with an account that can perform this action.

I these are some post that I rread in my effort to fix the issue.

http://blogs.technet.com/b/daveh/archive/2009/03/30/error-joining-im-livemeeting-conferences-in-office-communications-server-2007.aspx

http://techiefixation.blogspot.com/2009/01/office-communicator-2007-3-party.html

http://cmcgreanor.wordpress.com/2009/09/02/ocs-2007-r2-mcu-factory-issue/

http://ocsguy.com/2010/01/13/a-certificate-gotcha-that-got-me-again/

Friday, May 13, 2011

PowerShell Scripts Change User Attributes

Just a note on how to search and modify user attributes.  I recently had to use these cmlets to modify the Manager and Company field in AD.  

Modify Attributes for all users risiding in a particular OU. Start listing the OU. In this case all user in PayRoll OU will have Optimus Prime as Manager.

Get-ADUser -Filter * -SearchBase "OU=PayRoll,OU=Accounting,DC=YourDomain,DC=com" | Set-ADUser -Manager "Optimus Prime"

Copying one user’s group memberships to a second user. In this case all group memberships of the user Optimus Prime will get duplicated to MegaTron.

Get-ADPrincipalGroupMembership -Identity OptimusPrime | % {Add-ADPrincipalGroupMembership -Identity MegaTron -MemberOf $_}

Reporting on user accounts with non expiring Passwords.  Format teh output to display any properties.

Search-ADAccount -PasswordNeverExpires | FT Name, ObjectClass, UserPrincipalName

Thanks to the TechRepublic

Tuesday, May 3, 2011

Netbackup Device Mappings

Use the bellow process to update/install the Netbackup Device mappings.

1. Download and extract the new mappings file package to a temporary folder.  This will create three files in the temporary location:

    * Readme.txt
    * external_types.txt
    * external_robotics.txt

2. Copy the external_types.txt file from the temporary location to C:\Program Files\VERITAS\NetBackup\var\global\ on the Master Server or  EMM Server.

3. Copy the external_robotics.txt file from the temporary location to C:\Program Files\VERITAS\NetBackup\var\global\ on the master server, EMM Server, each media server that controls a robot, and each media server from which robot inventories will be run.

4. Bring up a command window with Start -> Run -> Type "cmd". Enter the following commands in that command window.

5. Update the NetBackup Enterprise Media Manager database with the new device mappings version. This only needs to be done once and must be run from the Master Server or the EMM Server.  Use the command format below that corresponds to the installed version of NetBackup:

NetBackup 6.5/7.0/7.1:  C:\Program Files\VERITAS\Volmgr\bin\tpext -loadEMM

7. Restart Device Manager (ltid) on each Media Server.

8. Verify that the version that is now stored in the Enterprise Media Manager database is the same as what is in the file stored on the Media Server:

C:\Program Files\VERITAS\Volmgr\bin\tpext -get_dev_mappings_ver


Device Mappings_V195.zip

Thursday, April 28, 2011

Search Active Directory for user properties

We are working on a project where we need to gather user telephone numbers from Active Directory in order to verify and normalize the telephone number filed.  This filed has to be formatted in a certain way and it also must be unique to a user, or the integration of Exchange and Cisco Unity Connection will not work.  My first thought was to use DSquery and DSget, but I decided to use the Get-ADuser Powershell cmdlet. 

In this case I just wanted First and Lastname and office telephone number.  So I used the following PS scripts 

From the Windows 2008 r2 AD Powershell Module:
Get-Aduser –Filter * -properties TelephoneNumber | FT Name,TelephoneNumber | Out-File C:\telnumberdump.txt

I like to dump results to TXT file, so I formatted the output  to deisplay Name and Telephone Number and then saved it to C: with Out-File. 


TechNet PS User Management

Backup and Restore NTFS and Share Permissions 2

NTFS permissions are stored as part of the file system itself, in an attribute in the Master File Table. So the backup and restore of NTFS permissions is somewhat different than Share Permissions.  Windows Server 2008 r2 is comes with a native utility to fulfill this purpose.

I used the following command to backup and restore the NTFS permissions: 
Backup and Restore NTFS:

icacls E:\Users\*   /save C:\NTFSPerm /T /C

The /T switch recourses through the directory to get sub folder and files, while the /C switch continues on error.

Restore:

icacls E:\ /restore C:\NTFSPerms.txt /C

When restoring the NTFS permissions only include the drive path and use the /C  switch to continue on error.

ICACLS Wiki

Friday, April 22, 2011

Backup and Restore NTFS and Share Permissions

We are in the process of migrating/upgrading our File and Application servers to Windows Server 2008r2.  Virtualization has really done away with hardware migration issues, but we still have to worry about OS and Application specific settings.

One task that is part of the server migration process is the backup and restore of the NTFS and Share permissions.  The Windows 2008 r2 server migration wizard facilitates the transfer of these settings, but I like to err on the side of caution and prefer to manually back them up. Share permissions are stored in the registry, so the backup of Share permissions is as easy as exporting a Registry Key.

Export the following reg key to a new file by right clicking on the Share reg Key and selecting Export.

HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares

CommandLine:
reg export HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares share.reg

To import by using the registry.exe, just double click on the reg key on the destination server.

CommandLin:
reg import share.reg

Windows Server 2008 VSS Space Usage

Quick note about Volume Shadow Copy (VSS).   VSS can be configured to use Space Limits or it can be configured to use all allocated space (No Limits).

When configured to use limits, VSS will purge old Snapshots when the limit is met.  No Limit configuration will start to purge the oldest Snapshots once physical allocated space has been used.  I chose to use the No limits option to maximize our Snapshot retention period.

Check Space used by VSS:
Vssadmin list ShadowCopyStorage

Thursday, April 14, 2011

PowerShell Script Get DirectorySize

This is more General Powershell script used to gather folder size infomration from our Home Directory server.

$startfolder = "E:\users\*"
$folders = get-childitem $startfolder | where{$_.PSiscontainer -eq "True"}
"Directory Name`tDirectory Size (MB)"
foreach ($fol in $Folders){
$colItems = (Get-ChildItem $fol.fullname -recurse | Measure-Object -property length -sum)
$size = "{0:N2}" -f ($colItems.sum / 1MB)
"$($fol.name)`t$size"
}



Thanks to the "Hey Scripting Guy" team

Wednesday, April 13, 2011

Netbackup Commands

Useful Netbackup commands to help troubleshoot.

Verifies DNS resolution
C:\Program Files\veritas\netbackup\bin
bpclntcmd -hn ClientName

DNS Reverse Lookup
C:\Program Files\veritas\netbackup\bin 
bpclntcmd -ip ClientIP

Clear Resource Allocation
installpath\bin\admincmd
nbrbutil -resetall

Resource Allocation Log
nbrbutil -dump

Netbackup jjob cleanup fails with status code 83
Run the following command:
nbdelete -allvolumes -force

nbdelete can be found in the following locations:
Windows: <install_path>\VERITAS\NetBackup\bin\admincmd






Tuesday, April 12, 2011

Netbackup Display Tape Drive Status (vmoprcmd)

This command will display the status of all drives attached to a netbackup media server.   I usually run it from the master server.  This command can run with switches, but I get the results I need by executing it on its own.

1.    Command Prompt.
2.    Cd C:\Program files\VERITAS\volmgr\bin\vmoprcmd.

Monday, April 11, 2011

Netbackup Eject Tapes from library (VMchange)

One of the most time consuming and most disliked tasks of netbackup administration is the removal of Tape from the tape library for offsite storage. In the past we have used the Admin Console’s GUI to query the catalog for a specific time frame which would output job results for a specific date.  We then used the job results to eject associated Tapes from the library using the GUI. 

I’ve tried to automate this process by using vmchange.exe via a script but I have not been able to work it out.  The documentation says that a CSV can be generated to jnput the MediaIDs to the command, but this is where my trouble begins.  The command executes correctly, but the MediaIDs do not get fed into the command.  The CSV file has to be a Colon (: ) separated.  I’ve worked around this by typing in the MediaIDs in the command prompt in a colon separated list which is faster than looking for MediaID using the GUI. 

I will try PowerShell in an attempt to automate this process, but for moment this the command I use. 

1.    From a command prompt cd to the default install location
2.    C:\Program Files\Veritas\Volmgr\bin\vmchange.exe -res -multi_eject -sc -rn 0 -rt TLD -rh netbackup -vh netbackup -v scan -ml 000924:000925:000926 ext.



--rn=RobotNumber
--rt=RobotType
-rh=RobotHost
-vh=VolumeHost
-v=Volume (where mediaID resides)
-ml=MediaList (Colon separated TapeIDs)



...

Netbackup Generate list of TapeIDs to Eject (bpimagelist)

Netbackup Administration is fairly easy and a straightforward process, and in my opinion not as automated as I would like.  Unix based installation may be better at automation via scripts, but at least in my experience dealing with a Windows installation I’ve not seen to much automation. 

I’ve tried to automate the process of Tape removal from the library but I’ve not been able t make it work.  One of my challenges has been automatically generating the list of media to eject.  I’ve read in Forum posts on how to incorporate bpimagelist in a netbackup exit script , which would generate a file with associated TapeIDs of the completed job, but I ‘ve not seen one for a Windows install.  In the meantime this what I use to generate the media list. 

1.    Query the Catalog for a specific date in which a full job completed. 
2.    Use the result of the query to fill in the info needed by the bpimagelist command. 
3.    Info needed
-d Date of job
-Client ClientName
-l
-policy PolicyName
-backupid  BackupID
4. On a command Prompt CD to default install path
admincmd\bpimagelist -d 10/29/2010 -client megatron01 -l -policy megatronPol
 -backupid megatron-_1288325930 -media>C:\scripts\TapeID.txt

This produces a text file with the associated TapeIDs that can then be used with vmchange.exe to eject the tapes. 


Symantec TechNote



..........

Friday, April 8, 2011

PowerShell Script to move Directories

This powershell script will recursively search and move files if file name matches text patten.  I needed to find all Novell GroupWise Archives scattered about users home directories. 

get-childitem E:\users -recurse | ? {$_.PSIsContainer -eq $true} | ? {$_.Name -like 'of???arc'} | move-item -destination R:\users\Archives\

Exchange 2007 PS Script to purge W3SVC1 logs

We have had issues where the IIS logs have been filling up our C drive on both our Mailbox Servers . This is the result of IIS web and Active Sync activity. The following PowerShell Script will purge logs older than 5 days as scheduled Windows Task. 

get-childitem -Path C:\inetpub\logs\LogFiles\w3svc1 -recurse | where-object {$_.lastwritetime -lt (get-date).addDays(-5)} | Foreach-Object { del $_.FullName }

Thanks to the exchange 2007 Technet forums. 

Thursday, April 7, 2011

PowerShell Script to Calculate FolderSize

This script will recursively search through a directory looking for matching text patterns in the name and measure the size of the folder in MB.  This will also list the file path.  

...............................

Function FolderSize
{
$startFolder = "E:\users"

$colItems = (Get-ChildItem $startFolder |where {$_.Length}|Measure-Object -property length -sum)
"$startFolder -- " + "{0:N2}" -f ($colItems.sum / 1MB) + " MB"

$colItems = (Get-ChildItem $startFolder -Recurse -Include of???arc | Where-Object {$_.PSIsContainer -eq $True} | Sort-Object)
foreach ($i in $colItems)
    {
        $subFolderItems = (Get-ChildItem $i.FullName |Measure-Object -property length -sum)
        $i.FullName + " -- " + "{0:N2}" -f ($subFolderItems.sum / 1MB) + " MB"
      
    }
    }
    FolderSize | Out-File C:\Temp\FolderSize.txt

................................................................................

Netbackup 7 Nbrbutil

Use the nbrbutil command to clear the allocation holds that the media server has placed.  The command can be run from the media server itself or the master server and is in the following path:

Windows: C:\Program Files\veritas\NetBackup\bin\admincmd\nbrbutil -resetall

nbrbutil -dump to dump log and diagnostic data. 

Windows: C:\Program Files\veritas\NetBackup\bin\admincmd\nbrbutil -resetall

Also available in the NBU command reference guide.  

Netbackup 7 Orphaned Jobs in Activity Monitor (Error Code 50)

Sometime in January I stopped a job from the activity monitor and it stopped with error code of 50.  I tried to lelete it from activity monitor but it did not delete..  After looking around Symantec Knolodge base I found a Technote that outlined the steps to delete the jobs database which removes orphaned jobs from the Activity Monitor.

1. stop NetBackup (bpdown) in the default folder: C:\Program Files\VERITAS\NetBackup\bin
2. bpps , kill the remaining processes
3. cd to install_path\veritas\netbackup\db\jobs
4. delete the bpjobd.act.db file  (Note: For Windows 2008, uncheck 'Hide extensions for known file types')
5. cd up to the restart folder
6. delete all files
7. cd..\trylogs
8. delete all files
9. cd..\ffilelogs
10. delete all files
11. restart NetBackup (bpup) in the default folder: C:\Program Files\VERITAS\NetBackup\bin

Technote

http://www.symantec.com/business/support/index?page=content&id=TECH43177

Wednesday, April 6, 2011

Exchange 2007 Clean-MailboxDatabase

When Active Directory accounts are disabled, associated mailboxes are disconnected, but do not show up under the Disconnected Mailxed under Exchange Management console.  Issue the following in the Exchange Management Shell. 

Clean-MailboxDatabase -identity db1


http://technet.microsoft.com/en-us/library/bb124076%28v=exchg.80%29.aspx

Exchange 2007 MailboxSize

From time to time we have to look report on the size of user Mailboxes, so this script will report the size of each mailbox. You can change the "TotalitemSize(MB) to GB if you want to report as Gigs.  The default is repoarted as kb.  This reports on a per mailbox server bases.

I like to write the results to a text file, that way I can then compare the text files using compare-object cmdlet to see how MailboxSize change. 

Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}},ItemCount | out-file C:\temp\mb1.txt

Netbackup 7.1 Unzip and Join split Files

I am getting ready to upgrade our Symantec Netbackup Enterprise Server from version 7.0 to 7.1.  I downloaded the Split file images and now have to join them.  On a windows system Command prompt cd to the location of the files and type in the following. Leave the original file names. 

copy /b "NetBackup_7.1_Win_zip.1of2"+"NetBackup_7.1_Win_zip.2of2" "NetBackup_7.1_Win.zip"


Exchange 2007 Database Size

This is a good way to report on Exchange 2007 database sizes.  ThisPowershell Script reports on the number of users per database.  I found the script in my notes and don't know who to give credit to.  

Get-MailboxDatabase | Select Server, StorageGroupName, Name, @{Name="Number Of Mailboxes";expression={(Get-Mailbox -Database $_.Identity | Measure-Object).Count}} | Format-Table -AutoSize

I like to write results to a text file, so I changed the Format-Table cmdlet to Out-File C:\temp\DbSize.txt