From f02f1b1d2b716923b180e8e276ddb9f381ead4b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Xalambr=C3=AD?= Date: Wed, 7 Feb 2024 19:45:05 -0500 Subject: [PATCH] Update route.tsx --- app/routes/_.cms._index/route.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/routes/_.cms._index/route.tsx b/app/routes/_.cms._index/route.tsx index 9994fa6..5a2db7b 100644 --- a/app/routes/_.cms._index/route.tsx +++ b/app/routes/_.cms._index/route.tsx @@ -92,9 +92,13 @@ export async function action({ request, context }: ActionFunctionArgs) { if (formData.get("intent") === INTENT.dump) { try { + console.log("creating db dump"); let dump = await context.db.dump(); + console.log("db dump created"); + console.log("dump size:", dump.byteLength); let date = new Date(); await context.fs.backups.put(`${date.toISOString()}.sql`, dump); + console.log("saved to R2"); return json({ intent: INTENT.dump, success: true }); } catch (error) { console.log(error);