I'm automating some replication process (lun to lun) to keep our DR machines updated with writable volumes and App Volumes from production. Is there a way to update the datastore via the API?
As said, we use a powershell script that checks if a disk is changed within a week (check it's timestamp) and then copy it from storage 1 to storage 2.
because we only copy we don;t do anyhting with the current writables, they are on the storage and Appvolumes can contact them.
If we do need to restore a writable it's as easy as just copying them from the backup location to the production location and overwrite the files. No need to do an import or anything like that. Because Appvolumes expects a disk to be there it's that simple. Off course the user needs to be logged out otherwise the disk is delete protected . Normally a restore takes up to 10 minutes but this is mostly due to the fact that it takes a few minutes for all disks to show up in the datastore browser in VSphere .
As far as i know, there is no API to update the datastore. Also, please note that App Volume APIs are not officially supported by VMware.
For replicating AppStacks from Production to DR, you may use 'Storage Groups' in App Volumes Manager that replicates the AppStacks across datastores.
This is a problem that has been around as long as Appvolumes has been around. This only works for readonly appstacks not for changable writables that can only be placed at 1 point in any given time.
We eventually came up with a solution to copy the writables from 1 NFS storage to another NFS stroage and vice versa with a "man in the middle" Server 2012 machine with an NFS client.
Not the best of all options but at least we have a backup of writables.
That being said. If anyone has a better solution please let me know. More than willing to listen to all options on the table .
We were quite hopefull with the release of ESXi 6.5, I believe that it has a copy-disk powercli command. Only thing is we don't have 6.5 running just yet (testing with it) and I'm not the best of all PowerCLI programmer.
What are you doing to copy the files? Once they are copied how do you make sure they are imported? Do you have to purge the previous copies from the destination on refreshes?
As said, we use a powershell script that checks if a disk is changed within a week (check it's timestamp) and then copy it from storage 1 to storage 2.
because we only copy we don;t do anyhting with the current writables, they are on the storage and Appvolumes can contact them.
If we do need to restore a writable it's as easy as just copying them from the backup location to the production location and overwrite the files. No need to do an import or anything like that. Because Appvolumes expects a disk to be there it's that simple. Off course the user needs to be logged out otherwise the disk is delete protected . Normally a restore takes up to 10 minutes but this is mostly due to the fact that it takes a few minutes for all disks to show up in the datastore browser in VSphere .
I see so just a powershell copy and overwrite the destination.
If you do a restore yes, just copy and overwrite.
Works pretty well. Thanks!
Just out of curiosity. How do you do the backup now? Do you use a script to copy the writables? Or do you do it manually? We have over 2000 writables so manual is not really an option here .
Also, how long does it take for 1 disk to be copied from 1 place to the other? We do see that during the copy it seems as if it does copy the full 20GB of the writable (yes, we extended the file a bit, 10 is very small for UIA + Profile) although the file is still thin provisoned when it arrives at the other end.
Hi,
You can use SCP command to transfer all writable volumes from one host at source to other host at destination host
note: make sure the host is attaching/having the shared "appvol datastore", please let me know if you need any help on "SCP command"
Thank you.
Hey VKMR. My guess is that SCP is a linux based command? I'm not that big of a programmer .
And if that would be possible, yes please
We do check now if a writable has been changed or not and we only backup the writable if it has been changed indeed. Otherwise we just leave it there and don;t backup the file.
Ray,
I agree with you it is Linux command, here it is
so your writable volumes has a storage which is attached to ESX host as datastore right?
if yes, we can use SCP to move all writable volumes from source host to destination host by using '-u' [which will update the changes] variable with SCP.
please feel free to ask for any help, if answer is yes to "so your writable volumes has a storage which is attached to ESX host as datastore right?"