Data Backup and Recovery
Maybe I am missing something, but how do i get XCP to create the source directory on the target?
xcp copy vserver1:/volume1/directory1 vserver2:/volume2
this command copies the FILES in directory1 to the ROOT of volume2 on vserver2. I would like the directory1 itself to be copied.
See The Solution
I think dst_vol is required:
"The copy command requires having source and destination paths as variables."
Could be that at some point the assumption was that users always copy one volume to another and if the destination doesn't exist, it'd be created by ONTAP admin rather than XCP user.
View solution in original post
Thanks for pointing me in the right direction. In the end needed to create the destination dir manually and use the subdirectory syntax:
xcp copy vserver1:/volume1:/subdirectory1 vserver2:/volume2:/subdirectory2
After the copy succeeds, subdirectory2 will have the proper ownership and modes.
Join our Discord Community