Posts Tagged ‘backup’

If the SQL databases are in simple recovery

Backup

ALTER DATABASE dbname

SET READ_ONLY;

GO
 

Backup database dbname

to disk = 'C:\...\dbname.bak'

 
Restore


Restore database dbname

from disk =  'C:\...\dbname.bak'

with recovery, replace

 

ALTER DATABASE dbname

SET MULTI_USER;

GO

If the databases are in full recovery model

Backup

Backup database dbname

to disk = 'C:\...\dbname.bak'

Backup log dbname

to disk = 'C:\...\dbname.trn'

with norecovery

 
Restore

 
Restore database dbname

from disk = 'C:\...\dbname.bak'

with norecovery, replace

Restore log test2

from disk = 'C:\...\dbname.trn'

with recovery
 
VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Recently we had jobs for a server showing up the error : NFC storage connection is unavailable

Image result for NFC storage connection is unavailable

Turns out a colleague had added a server to the Veeam application with a tape drive to the unit which had actually added that server as a Veeam Backup Proxy!

Jobs actually default to “Use Any Available Proxy” so the Jobs were using the tape drive server as a proxy for some of the Jobs hence the NFC Failure

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Set objShell = CreateObject( "WScript.Shell" )
Set objFSO = CreateObject("Scripting.FileSystemObject")
appDataLocation=objShell.ExpandEnvironmentStrings("%APPDATA%")
quick_normal_location = appDataLocation & "\Microsoft\Templates\"
quick_normal_location_file = appDataLocation & "\Microsoft\Templates\Normal.dotm"
		normal_local_network = "%network localtion%Normal.dotm"

' Does the network normal exist
If objFSO.FileExists(normal_local_network) = True Then
	' Does the Local Normal Exist
	If objFSO.FileExists(quick_normal_location_file) = True Then
			' Check to see if the Local Normal is older than the newer Normal
		If CDate(objFSO.GetFile(normal_local_network).DateLastModified) > CDate(objFSO.GetFile(quick_normal_location_file).DateLastModified) Then
			intBkpNum = 1
			While objFSO.FileExists(quick_normal_location_file & intBkpNum) = True
				intBkpNum = intBkpNum + 1
			Wend
			objFSO.MoveFile quick_normal_location_file, quick_normal_location_file & intBkpNum
			objFSO.CopyFile normal_local_network, quick_normal_location_file
		End If
	End If
End If
VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Per my backup script before , this restores

You will need to go through and change the values in %

 

$mailbox = Get-Mailbox %mailbox%
$mailAddress = $mailbox.PrimarySmtpAddress.ToString();
 
[Reflection.Assembly]::LoadFile("C:\Program Files (x86)\Microsoft\Exchange\Web Services\2.1\Microsoft.Exchange.WebServices.dll") | Out-Null
$s = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2010_SP1)
$s.AutodiscoverUrl($mailAddress);
 
 
$cred = New-Object System.Net.NetworkCredential("%username%","%password%")
 
 
$windowsIdentity = [System.Security.Principal.WindowsIdentity]::GetCurrent()
$sidbind = "LDAP://<SID=" + $windowsIdentity.user.Value.ToString() + ">"
$aceuser = [ADSI]$sidbind
$s.Credentials = $cred
 
$MailboxRootid = new-object  Microsoft.Exchange.WebServices.Data.FolderId([Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::MsgFolderRoot,$mailAddress)
$MailboxRoot = [Microsoft.Exchange.WebServices.Data.Folder]::Bind($s,$MailboxRootid)
 
# Get Folder ID from Path
Function GetFolder()
{
	# Return a reference to a folder specified by path
 
	$RootFolder, $FolderPath = $args[0];
 
	$Folder = $RootFolder;
	if ($FolderPath -ne '\')
	{
		$PathElements = $FolderPath -split '\\';
		For ($i=0; $i -lt $PathElements.Count; $i++)
		{
			if ($PathElements[$i])
			{
				$View = New-Object  Microsoft.Exchange.WebServices.Data.FolderView(2,0);
				$View.Traversal = [Microsoft.Exchange.WebServices.Data.FolderTraversal]::Deep;
				$View.PropertySet = [Microsoft.Exchange.WebServices.Data.BasePropertySet]::IdOnly;
 
				$SearchFilter = New-Object Microsoft.Exchange.WebServices.Data.SearchFilter+IsEqualTo([Microsoft.Exchange.WebServices.Data.FolderSchema]::DisplayName, $PathElements[$i]);
 
				$FolderResults = $Folder.FindFolders($SearchFilter, $View);
				if ($FolderResults.TotalCount -ne 1)
				{
					# We have either none or more than one folder returned... Either way, we can't continue
					$Folder = $null;
					Write-Host "Failed to find " $PathElements[$i];
					Write-Host "Requested folder path: " $FolderPath;
					break;
				}
 
				$Folder = [Microsoft.Exchange.WebServices.Data.Folder]::Bind($s, $FolderResults.Folders[0].Id)
			}
		}
	}
 
	$Folder;
}
 
 
$file = [System.IO.File]::ReadAllBytes("c:\%folder%\%binaryfile%")
$data = [System.Convert]::ToBase64String($file)
 
#change folder where needed
$folderobject = GetFolder($MailboxRoot, "\Quick Step Settings\");
$folderid = $folderobject.id.uniqueid
$folderchangekey = $folderobject.id.ChangeKey
 
$expRequest = @"
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
      xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">
  <soap:Header>
    <t:RequestServerVersion Version="Exchange2010_SP1" />
  </soap:Header>
  <soap:Body>
  <m:UploadItems>
      <m:Items>
        <t:Item CreateAction="CreateNew" IsAssociated="true">
          <t:ParentFolderId  Id="$folderid" ChangeKey="$folderchangekey"/>
          <t:Data>$data</t:Data>
        </t:Item>
      </m:Items>
    </m:UploadItems>
  </soap:Body>
</soap:Envelope>
"@
 
$mbMailboxFolderURI = New-Object System.Uri($s.url)
$wrWebRequest = [System.Net.WebRequest]::Create($mbMailboxFolderURI)
$wrWebRequest.KeepAlive = $false;
$wrWebRequest.Headers.Set("Pragma", "no-cache");
$wrWebRequest.Headers.Set("Translate", "f");
$wrWebRequest.Headers.Set("Depth", "0");
$wrWebRequest.ContentType = "text/xml";
$wrWebRequest.ContentLength = $expRequest.Length;
$wrWebRequest.Timeout = 60000;
$wrWebRequest.Method = "POST";
$wrWebRequest.Credentials = $cred
$bqByteQuery = [System.Text.Encoding]::ASCII.GetBytes($expRequest);
$wrWebRequest.ContentLength = $bqByteQuery.Length;
$rsRequestStream = $wrWebRequest.GetRequestStream();
$rsRequestStream.Write($bqByteQuery, 0, $bqByteQuery.Length);
$rsRequestStream.Close();
$wrWebResponse = $wrWebRequest.GetResponse();
$rsResponseStream = $wrWebResponse.GetResponseStream()
$sr = new-object System.IO.StreamReader($rsResponseStream);
$rdResponseDocument = New-Object System.Xml.XmlDocument
$rdResponseDocument.LoadXml($sr.ReadToEnd());
$Datanodes = @($rdResponseDocument.getElementsByTagName("m:ResponseCode"))
$Datanodes
VN:F [1.9.22_1171]
Rating: 1.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: -1 (from 1 vote)

VeamBackupFailureAfter going in to each of the servers it displays the error “Cannot complete login due to incorrect username or password”

After a recent password change our Veam jobs would start for a few seconds then fail.

 

In Veam, go to File , then Manage Credentials

Add the New Username / Password for Veam to Use

Next Click onVirtual Machines Tab ( Bottom Left) , Under Vmware vSpere find the Vcenter ( will have VC in the icon) as this is probably authenticated through active direvtory. Right click and change the credentials to the new one

Next go to Backup & Replication and right click on each job, Edit and Go to Guess Processing and if enabled change the Credentials to the new ones entered above.

 

VN:F [1.9.22_1171]
Rating: 7.5/10 (4 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 2 votes)

image1[1]Recently I was trying to take a backup of the configuration for a NetApp SAN for a scheduled power shutdown. Per this useful guide : http://pipe2text.com/?page_id=1472 this can be done through the OnCommand facility.

However once I tried to create the backup file I was given the error configuration plugin for data ontap version 8.1.1 is not installed. A look on Netapp Support shows I would need to download the software and install , however when I checked the below I only found version 8.1.3 which means I would need to reinstall and upgrade. I just wanted to get a config backup before the power down!!!

  1. Go to http://support.netapp.com & login using your account.
  1. Go to Download -> Software
  1. Go to the Data ONTAP download section and supply the model of your controller (FAS2240-4) and click “GO”.
  1. In the “Data ONTAP for FAS2240-4” page, find ONTAP 8.1.1 and click “View and Download” button.
  1. Scroll down to the section titled, “Support for OnCommand Core Package or Operations Manager and DataFabric® Manager server multiple-system configurations
  1. Click the link under that section titled “Data ONTAP 8.1.1 Operating in 7-Mode Plug-in for DataFabric Manager Server”.

So I found another way 🙂

1) Login to the netapp controllers indivdually via SSH ( not through the service port )

2) Run ‘config dump -v nameofbackup’, this will backup to the \etc\configs directory

3) Open \\nameofnetappcontroller\c$ ( Samba share )

4) Browse to \\nameofnetappcontroller\c$\etc\configs and copy the file off

VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)