From 16f52b7bef745097f7076dde76715db378b54343 Mon Sep 17 00:00:00 2001
From: JJ <nicetry@noemail.com>
Date: Wed, 19 Mar 2025 14:56:26 +0000
Subject: first commit

---
 content/snippets/algolia-copy-between-apps.md | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 content/snippets/algolia-copy-between-apps.md

(limited to 'content/snippets/algolia-copy-between-apps.md')

diff --git a/content/snippets/algolia-copy-between-apps.md b/content/snippets/algolia-copy-between-apps.md
new file mode 100644
index 0000000..8bd80d8
--- /dev/null
+++ b/content/snippets/algolia-copy-between-apps.md
@@ -0,0 +1,27 @@
+---
+title: Copy indices between Algolia apps w/ CLI
+description: Copy indices between Algolia apps w/ CLI
+tags: ["algolia"]
+---
+
+Ensure the [Algolia CLI](https://www.algolia.com/doc/tools/cli/get-started/overview/#install-the-algolia-cli) is installed
+
+```console
+algolia profile add
+```
+
+Add both your profiles, e.g `account1`, `account`
+
+```console
+algolia objects browse INDEX_NAME > records.json --profile account1
+```
+
+Pull the records locally.
+
+Then upload to second app and index (ensure you change the `--profile` flag ).
+
+The `-F` (short for `--file`) flag in Algolia CLI lets you read from a JSON file.
+
+```console
+algolia objects import INDEX_2_NAME -F records.json --profile account2
+```
-- 
cgit v1.2.3