Is it possible to duplicate a Repl with all its data including Replit dabase's

Hey Replit Community,
I’m currently working on a Node.js project and wanted to know if it’s possible to somehow clone or duplicate this project. As far as I know, cloning can be achieved via uploading a repl into Github, then creating a blank Node.js repl and simply importing the code upon clicking the Import from Github button. But will this also clone data from Replit database? Otherwise, is there an alternative way?

Thanks in advance!

Visit your Repl’s cover page (the Repl’s link with ?v=1 on the end), then click “fork”. This won’t copy the database however and there is no official way to do that. However, there have been community attempts to do this.


Hey, @CoderElijah !
Thanks for your response! The fact that it’s not possible to clone the database’s data is disappointing, ngl. Do you know, is it possible to migrate the DB to a remote host? This way it’ll be accessible from cloned repl I guess

1 Like

It’s not possible to do so easily. If you have edit access to both Repls in question, then it can be done.
New Repl (One-Liner, works in Console and in


Copy the URL that outputs, then do this in the Old Repl (Multi-Line, but should work in both as well):

for k in db: new[k]=db[k]

As long as your DB doesn’t have any bad keys, this should work.

Note: I minimized the above code quite a bit, if you’d like to see un-minimized code, I’ll be happy to oblige.


Thanks for code @Firepup650 ! Could you please share a code to achieve the same result but in Node.js (JavaScript code I mean)?

Thanks in advance!

1 Like

I made a little library some time ago that you could try:
By the way, you can just use the shell to get the database URL since it’s an environment variable.



const db = require("ez-repldb");
db.import("<insert REPLIT_DB_URL here>");

It might not be functional, I haven’t checked it in quite a while and I might have left it in a partially working state. :man_shrugging:

Essentially, all that does is something like this (but from scratch using fetch requests rather than Replit’s library):

const Client = require("@replit/database");

const new_db = new Client();
const old_db = new Client("<insert REPLIT_DB_URL here>");

	.then((db) => {
		for (const key in db) {
			new_db.set(key, db[key]);

@MattDESTROYER Thanks very much for sharing the code! I’ll try that!