I have a Firebase child with nearly 500k records. I want to duplicate this child in order to create a backup of the data (within the same Firebase). So, if my child is called lines
, I want to duplicate it but with a new name such as lines_backup_02_02_2016
. Once this is done I want the original lines
left as is.
Is there some way to do this without grabbing a dataSnapshot
via Javascript (downloading the data) and then using set()
to create the copy? For example:
fb.child("lines").once('value', function(snapshot) {
fb.child("lines_backup_02_02_2016").set(snapshot.val());
});
With 500k records I'm finding this takes longer than I've been able to wait so far (for example, I've typed this question while still waiting for it to finish).