Programmatically create a new node from an existing NID Essentially I want to take a node and duplicate it. Take a node ID and programmatically create a copy of the node.
I want to be able to edit the newly created node, and maintain the data on the old node.
On entities, you can use is_new to signify a new entity to save, but you still need to unset nid (iirc), vid, and tnid manually. This saves unsetting log. 

$new = clone $node;
$new-&gt;is_new = true;
unset($new-&gt;nid);
unset($new-&gt;vid);
unset($new-&gt;tnid);
node_save($new);


Interestingly, the node_clone module incorrectly sets the properties to null, which is significant for databases that support NULL and DEFAULT separately (e.g. PostgreSQL).