"File Copy" Job cmdlet

PowerShell script exchange

"File Copy" Job cmdlet

Veeam Logoby gcanales » Tue Jan 07, 2014 11:02 pm

Hello,

A customer discovered the file copy jobs and asked me to create jobs to backup some local files in a few non-virtual servers and importants PCs. Almost 30 :shock:

Immediately thought in using Powershell to create those jobs, took a good look on the documentation, but I could find the cmdlet to create "file copy" jobs. Is there any? Please tell there is one.

Custo has B&R 7.0 R2 latest patch up to today installed.

Thanks
gcanales
Novice
 
Posts: 9
Liked: never
Joined: Sun Feb 24, 2013 6:51 pm
Full Name: Gilberto Canales

Re: "File Copy" Job cmdlet

Veeam Logoby Vitaliy S. » Wed Jan 08, 2014 12:42 pm

Hi Gilberto,

I'm not a PowerShell expert, but I believe you should be using this cmdlet - Add-VBRCopyJob (which can be used to create VM and file copy jobs).

Thanks!
Vitaliy S.
Veeam Software
 
Posts: 19540
Liked: 1097 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: "File Copy" Job cmdlet

Veeam Logoby v.Eremin » Wed Jan 08, 2014 2:42 pm

More information regarding this commandlet can be found here.
v.Eremin
Veeam Software
 
Posts: 13255
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: "File Copy" Job cmdlet

Veeam Logoby benc » Sun Mar 02, 2014 2:59 am

Hey Gilberto, did you ever manage to come up with the proper command line for this? I would be interested in knowing...

Thanks!
Ben
benc
Novice
 
Posts: 5
Liked: never
Joined: Sun Mar 02, 2014 12:11 am
Full Name: Ben Castellucci

Re: "File Copy" Job cmdlet

Veeam Logoby v.Eremin » Mon Mar 03, 2014 9:19 am

Hi, Ben, as mentioned above, the cmdlet that should be used here is Add-VBRCopyJob. Can you elaborate on what particular issues (if any) you have faced while using it? Thanks.
v.Eremin
Veeam Software
 
Posts: 13255
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: "File Copy" Job cmdlet

Veeam Logoby PNWMtnBiker » Tue Mar 04, 2014 12:10 am

gcanales wrote:Hello,

A customer discovered the file copy jobs and asked me to create jobs to backup some local files in a few non-virtual servers and importants PCs. Almost 30 :shock:

Immediately thought in using Powershell to create those jobs, took a good look on the documentation, but I could find the cmdlet to create "file copy" jobs. Is there any? Please tell there is one.

Custo has B&R 7.0 R2 latest patch up to today installed.

Thanks


The file copy job is for copying files from one datastore to another. It won't touch a non-virtual anything.

If a similar task was given to me I would use robocopy to copy those files from the sources to a virtual file server and then that virtual server would be backed up by Veeam.
PNWMtnBiker
Enthusiast
 
Posts: 63
Liked: 8 times
Joined: Thu Jan 16, 2014 11:12 pm
Full Name: Jon Dufour

Re: "File Copy" Job cmdlet

Veeam Logoby v.Eremin » Tue Mar 04, 2014 8:17 am

The file copy job is for copying files from one datastore to another. It won't touch a non-virtual anything.

Actually, the situation is slightly different. With the file copy job, you can copy files from/to any server added to backup server console; no matter what platform the server is using: physical or virtual one. Thanks.
v.Eremin
Veeam Software
 
Posts: 13255
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: "File Copy" Job cmdlet

Veeam Logoby PNWMtnBiker » Tue Mar 04, 2014 5:14 pm

v.Eremin wrote:
The file copy job is for copying files from one datastore to another. It won't touch a non-virtual anything.

Actually, the situation is slightly different. With the file copy job, you can copy files from/to any server added to backup server console; no matter what platform the server is using: physical or virtual one. Thanks.


Holy Cow you are right, I had honestly tried just about a month ago and found I could only copy files that were in a datastore. But double checking this now I see that I had to register the source machine and it installs the transport software and then I can access the file system.

Even though I was incorrect I'm glad I had commented because I learned something new now :D
PNWMtnBiker
Enthusiast
 
Posts: 63
Liked: 8 times
Joined: Thu Jan 16, 2014 11:12 pm
Full Name: Jon Dufour

Re: "File Copy" Job cmdlet

Veeam Logoby v.Eremin » Wed Mar 05, 2014 8:26 am

Yes, in order to copy files between two servers all you need to do is to go to "Files" node, select required files, and copy them. Otherwise, this process can be automated by File Copy Job.

Glad to hear that I was able to provide the useful knowledge. :)
v.Eremin
Veeam Software
 
Posts: 13255
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: "File Copy" Job cmdlet

Veeam Logoby benc » Mon Mar 10, 2014 11:49 am

Thanks everyone. All this sounds like what I have found so far. Problem is I am unsure of the actual syntax to do this in powershell. From the gui there is the option to choose the source server & file path, then the same choices for destination. In the cmdlet there are only equivalent parameters for destination. The source parameter (-Objects) is a list of vm names. Additionally if I list an existing copy job like this (created with gui) it's type is, 'File Copy' which is not documented in the cmdlet help nor in online documentation. If the destination parameters were something like, '-DestinationServer' instead of just, '-Server' then I would at least experiment and try, '-SourceServer' or something but I am a little stumped.

Has anyone actually been able to create one of these from powershell? If so I would be interested in the syntax used.

Thanks again!
Ben
benc
Novice
 
Posts: 5
Liked: never
Joined: Sun Mar 02, 2014 12:11 am
Full Name: Ben Castellucci

Re: "File Copy" Job cmdlet

Veeam Logoby v.Eremin » Mon Mar 10, 2014 1:48 pm

Hi, Ben, it seems that both me and Vitaliy have confused file copy job with VM copy one and provided you with the commandlet that is responsible for VM copy job creation.

As to file copy job, I can't remember the required commandlet off the top of my head, but I will double check it tomorrow, once I'm in the office.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13255
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: "File Copy" Job cmdlet

Veeam Logoby v.Eremin » Tue Mar 11, 2014 9:29 am

As far as I can tell, in order to create File Copy Job you have to specify "Files" in -Type switch. However, I can't find a way to select "source" files to copy.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13255
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: "File Copy" Job cmdlet

Veeam Logoby benc » Wed Mar 12, 2014 11:38 pm

Thank you for checking into that.

Seems maybe the cmdlet is incomplete.

I think I can get around it by just creating scheduled file copy jobs with the gui.

Thanks again!
benc
Novice
 
Posts: 5
Liked: never
Joined: Sun Mar 02, 2014 12:11 am
Full Name: Ben Castellucci

Re: "File Copy" Job cmdlet

Veeam Logoby v.Eremin » Thu Mar 13, 2014 8:19 am

Are these jobs going to have something in common? "Source", "Target", "Schedule", etc.? Thanks.
v.Eremin
Veeam Software
 
Posts: 13255
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: "File Copy" Job cmdlet

Veeam Logoby benc » Sun Mar 16, 2014 6:15 am

My goal was to do a powershell script as a scheduled task to veamzip a vm then do a one-off file copy job.

These would all have the same source & folder but obviously different files.

I can just create a scheduled file copy job with the gui that grabs all files in a particular folder then do the veamzip-ing such that they all [hopefully] complete before it runs.
benc
Novice
 
Posts: 5
Liked: never
Joined: Sun Mar 02, 2014 12:11 am
Full Name: Ben Castellucci

Next

Return to PowerShell



Who is online

Users browsing this forum: quazer and 9 guests