maybe this can help you: zip the world: https://github.com/svilex/SkyWars-PocketMine/blob/master/php7/src/svile/sw/SWcommands.php#L190 unzip it: https://github.com/svilex/SkyWars-PocketMine/blob/master/php7/src/svile/sw/SWarena.php#L115
I would rather just copy the world folder somewhere and then replace the "real" world folder with the saved world folder.