Description
Exportsnapshot will write a new snapshot info file when specifying the target name:
if (!targetName.equals(snapshotName)) {
SnapshotDescription snapshotDesc =
SnapshotDescriptionUtils.readSnapshotInfo(inputFs, snapshotDir)
.toBuilder()
.setName(targetName)
.build();
SnapshotDescriptionUtils.writeSnapshotInfo(snapshotDesc, snapshotTmpDir, outputFs);
}
The snapshot info file will be written to the snapshot tmp directory, however, it should be directly written to the snapshot directory if snapshot.export.skip.tmp is true. In addition, owner and permission should be set for the new snapshot info file when needed.