DumpKey command1 = new DumpKey(sourceId, sourceDb, sourceKey);
command1.execute();
byte[] value = command1.getValue();
RestoreKey command2 = new RestoreKey(targetId, targetDb, targetKey, value);
command2.execute();
if(!copy)
deleteKey(sourceId, sourceDb, sourceKey);
if(changeTarget)