Host-based backup of VMware vSphere VMs.
Post Reply
rtheseeker
Enthusiast
Posts: 56
Liked: 2 times
Joined: Sep 26, 2022 9:13 pm
Full Name: Rajeev Mehta
Contact:

File copy and scripting to achive a sync :

Post by rtheseeker »

We have a file copy job that copies the file from a datastore to a Windows machine (client request as source vmdks are unmounted)
Then there is another VM level job which backs up the Windows VM to our repository (just to ensure we can go back; if there was a crypto)
We want to be able to delete the existing data on the Windows machine before the file copy job; so that the file copy always results in insync data with DS
This way we will be able to achieve a mirror of the source data and this will ensure nothing stale exists on Windows location.
However I noticed that the file copy does not have any option to run a script prior to starting the job; any suggestions before I create a scheudle task on the Windows VM; I noticed as it is a VM level job; Veeam does not leave any event on the Windows VM; otherwise I would have used a script to trigger once the event gets logged
Dima P.
Product Manager
Posts: 14417
Liked: 1576 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: File copy and scripting to achive a sync :

Post by Dima P. »

Hi rtheseeker,

There is no need to delete the file manually or via scripting, file copy job overwrites entire file at the target location whenever there is a newer version at the source side. Thanks!
rtheseeker
Enthusiast
Posts: 56
Liked: 2 times
Joined: Sep 26, 2022 9:13 pm
Full Name: Rajeev Mehta
Contact:

Re: File copy and scripting to achive a sync :

Post by rtheseeker »

yup but it does not remove the already copied file; say during the first copy source had file 1, file 2 and file 3; file copy ran and now destination has file 1, 2 and 3
now if file 1 was deleted from source; it has file 2m 3 and 4; although the next copy will overwrite 2 and 3, file 1 will stay on the destination along wiht file 4. So I had to sort this out using powershell script and schedule task that clears the destination before the file copy;
Post Reply

Who is online

Users browsing this forum: No registered users and 61 guests