EDIT: You can now find a better explanation with the code [here][3]here.
I know this is old but maybe someone comes here looking for an answer like me, this is tested on Drupal 8.
I found this [issue][1]issue and after looking at last [patch][2]patch, I implemented :
$nodeDuplicate = $node->createDuplicate();
foreach($nodeDuplicate->field_paragraphs as $field){
$field->entity = $field->entity->createDuplicate();
}
$nodeDuplicate->save();
And I got a duplicate node with duplicated paragraphs fields. If you look at the patch you will see how to add a button to Drupal etc.
Just a note field_paragraphs
is the name of my field in the content type, change it with your own.
I didn't have any problem doing it this way, maybe someone has a better way but I did not find it, also at the time of writing this there is still no ported modules for cloning nodes in Drupal 8. [1]: https://www.drupal.org/node/2829316 [2]: https://www.drupal.org/files/issues/implement_duplicate-2829316-53.patch [3]: https://kunicmarko20.github.io/2017/05/04/Clone-Duplicate-Node-with-Paragraphs-field-in-Drupal-8.html