VMware Cloud Community
baber
Expert
Expert
Jump to solution

How can migrate content library from Datasttore1 to Datastore2

Is that possible content library from one datastore to other ?

My content library hs been resided on datastore1 that contain more than 10 iso file and more than 50 template now I had to remove his datastore How can migrate content library from datastore1 to datastore2 ?

BR

Please mark helpful or correct if my answer resolved your issue.
1 Solution

Accepted Solutions
amohammadimir
Hot Shot
Hot Shot
Jump to solution

You can create another local Content Library and use PowerCLI cmdlet "Copy-ContentLibraryItem" in order to copy items.

For example:

$item = Get-ContentLibraryItem -Name 'CentOS-7-x86_64-Minimal-1908' -ContentLibrary 'FirtstContentLibrary'

$library = Get-ContentLibrary -Name 'SecondContentLibray' -Local

Copy-ContentLibraryItem -ContentLibraryItem $item -Destination $library

Please remember to mark the replies as answers if they helped.

View solution in original post

4 Replies
a_p_
Leadership
Leadership
Jump to solution

Please see whether lamw07's reply at https://www.reddit.com/r/vmware/comments/5z23gb/move_content_library/ works for you.

André

baber
Expert
Expert
Jump to solution

Thanks. This is a good solution , just after replication between two CL finished and I will delete first CL and Is that possible change the role of second CL from subscribe to Local ?

BR

Please mark helpful or correct if my answer resolved your issue.
Reply
0 Kudos
baber
Expert
Expert
Jump to solution

After sync between two CL we had to remove CL1 and change CL2 role from subscribe to local and this change is not possible.

Please mark helpful or correct if my answer resolved your issue.
Reply
0 Kudos
amohammadimir
Hot Shot
Hot Shot
Jump to solution

You can create another local Content Library and use PowerCLI cmdlet "Copy-ContentLibraryItem" in order to copy items.

For example:

$item = Get-ContentLibraryItem -Name 'CentOS-7-x86_64-Minimal-1908' -ContentLibrary 'FirtstContentLibrary'

$library = Get-ContentLibrary -Name 'SecondContentLibray' -Local

Copy-ContentLibraryItem -ContentLibraryItem $item -Destination $library

Please remember to mark the replies as answers if they helped.