Comprehensive data protection for all workloads
Post Reply
flavor4real
Expert
Posts: 205
Liked: 5 times
Joined: Nov 22, 2010 7:57 pm
Full Name: DS
Contact:

Replicating VBK's/VIB's to DataDomain Question

Post by flavor4real »

Hello guys,
I'm thinking of instead of moving VBK's and VIB's to tape, to move it to our Data Domain. We only keep 1-2weeks of data of the selected servers as backups, so it would be convenient to simple have a replication (data Duplication) at the same time when the Veeam Backup Jobs kick in.

What would be a good practice to do so?
Gostev
Chief Product Officer
Posts: 31521
Liked: 6699 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Replicating VBK's/VIB's to DataDomain Question

Post by Gostev »

Hi, did you miss my reply to this earlier today?
Best Practice for putting Veeam Backups on Tape?

Very straightforward really, just setup backup file copying using the post-job script referenced in the above topic (just replace the part that runs tape backup tool with regular file copy command).

The script will:
a) Copy backup file only after successful backup
b) Always copy only latest (most recent) backup file
c) Sets archive bit on copied backup file on to make sure the same file is not copied more than once accidentally (validation is done via archive bit)
flavor4real
Expert
Posts: 205
Liked: 5 times
Joined: Nov 22, 2010 7:57 pm
Full Name: DS
Contact:

Re: Replicating VBK's/VIB's to DataDomain Question

Post by flavor4real »

It's one of these days i guess. I've read it but then I missed it too, lol. sorry ;)
I'm new with this too
flavor4real
Expert
Posts: 205
Liked: 5 times
Joined: Nov 22, 2010 7:57 pm
Full Name: DS
Contact:

Re: Replicating VBK's/VIB's to DataDomain Question

Post by flavor4real »

Can I use the comand below to copy ??
xcopy /s c:\source d:\target


I'm looking into the script below and i need some help. Where would the target patch need to be inserted and where the original path?
I'm trying to get the big picture; what is the Add-PSSnapin VeeamPSSnapIn? aonline search didn't really helped me a lot. More pointed that it's a cmd/consol type of view where i can start/setup/modify jobs. the search brought me also to the View 4.5 ThinApp Configuration

Let me break it down:
1. Where would the target patch need to be inserted and where the original path in the path below?
2. what else do I have to modify below in order to copy the backups files to a datadomain?
3. What is Add-PSSnapin VeeamPSSnapIn?
4. What is ThinApp Configuration?
thanks ;)

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Add-PSSnapin VeeamPSSnapIn

$jobName = "DSM File Servers"

if ((Get-VBRJob | where {$_.Name -eq $jobName}).GetLastResult() -eq "Success")
{
$latestOib = Get-VBRBackup | where {$_.JobName -eq $jobName} | Get-VBRRestorePoint | sort CreationTime -Descending | select -First 1
$latestOib
$storage = $latestOib.GetStorage()
$storage.FilePath

$file = get-item $storage.FilePath
if ($file.Attributes -band ([System.IO.FileAttributes]::Archive))
{
path_to_tape_backup_exe $storage.FilePath

$file.Attributes = ($file.Attributes -bxor [System.IO.FileAttributes]::Archive)
}
}

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Gostev
Chief Product Officer
Posts: 31521
Liked: 6699 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Replicating VBK's/VIB's to DataDomain Question

Post by Gostev »

Just replace:
path_to_tape_backup_exe $storage.FilePath

With:
xcopy /s $storage.FilePath d:\target

1. See above.
2. You should be good to go (unless I messed up with PowerShell syntaxis, which I do not know).
3. Add-PSSnapin is a PowerShell command that adds Veeam PowerShell snap-in as a namespace for the script.
4. Something totally unrelated to this whole topic. If you are naturally interested to learn this, then please just Google it. :D
flavor4real
Expert
Posts: 205
Liked: 5 times
Joined: Nov 22, 2010 7:57 pm
Full Name: DS
Contact:

Re: Replicating VBK's/VIB's to DataDomain Question

Post by flavor4real »

Do I have to save it a cmd or bat file? Then i can simple point to it over the advance option right?
;) I'm learning here
Gostev
Chief Product Officer
Posts: 31521
Liked: 6699 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Replicating VBK's/VIB's to DataDomain Question

Post by Gostev »

Yes, but PowerShell scripts use different extension. Please, take a look at the last post in the sticky FAQ for some beginner guides to PowerShell.
flavor4real
Expert
Posts: 205
Liked: 5 times
Joined: Nov 22, 2010 7:57 pm
Full Name: DS
Contact:

Re: Replicating VBK's/VIB's to DataDomain Question

Post by flavor4real »

Hello guys,
how are y'all doing today ...?

My question:
If I have the PowerShell taaking care of the replication to Data Domain, then I come to another issue (I think). If the script replicate VIB's and VBK's to the DataDomain, it will eventually fill up. I have to go in manually and remove older VIB's VBK's. Now, since the VIB' and VBK's naming convention changes due the date change, it will not overwrite the existing file.

How can I tackle this issue the best?
flavor4real
Expert
Posts: 205
Liked: 5 times
Joined: Nov 22, 2010 7:57 pm
Full Name: DS
Contact:

Replicating Bk's to DataDomain, removing older files via PSS

Post by flavor4real »

I found this here, just wanted to see if someone else had something better...

$DataFolder = “c:\scandocs”
$10Days = (get-Date).adddays(-10)
Get-Childitem $DataFolder -recurse | ?{!$_.PSIsContainer -and ($_.LastWriteTime -lt (get-Date).adddays(-10))} | remove-item -whatif -force

I only keep the last 7 days, but If keeping the latest 10 days would give me a window where the lates 7 days would be there for sure. I can go manually in in case the 10 days would overlap somehow because of the monthend (30, 31, 28/29).

You think this is a good practice? If, then the complete script would look like as following

////////////////////////////////////
Add-PSSnapin VeeamPSSnapIn
$jobName = "DSM File Servers"
if ((Get-VBRJob | where {$_.Name -eq $jobName}).GetLastResult() -eq "Success")
{
$latestOib = Get-VBRBackup | where {$_.JobName -eq $jobName} | Get-VBRRestorePoint | sort CreationTime -Descending | select -First 1
$latestOib
$storage = $latestOib.GetStorage()
$storage.FilePath

$file = get-item $storage.FilePath
if ($file.Attributes -band ([System.IO.FileAttributes]::Archive))
{

# In here we set the path.
# xcopy /s $storage.FilePath d:\target
xcopy /s $storage.FilePath d:\target

$DataFolder = “c:\scandocs”
$10Days = (get-Date).adddays(-10)

Get-Childitem $DataFolder -recurse | ?{!$_.PSIsContainer -and ($_.LastWriteTime -lt (get-Date).adddays(-10))} | remove-item -whatif -force

$file.Attributes = ($file.Attributes -bxor [System.IO.FileAttributes]::Archive)
}
}
////////////////////////////////////
Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 61 guests