aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sql/dump_file_meta.sql12
1 files changed, 12 insertions, 0 deletions
diff --git a/sql/dump_file_meta.sql b/sql/dump_file_meta.sql
new file mode 100644
index 0000000..1028c13
--- /dev/null
+++ b/sql/dump_file_meta.sql
@@ -0,0 +1,12 @@
+
+BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY DEFERRABLE;
+
+COPY (
+ SELECT sha1hex, row_to_json(file_meta)
+ FROM file_meta
+ ORDER BY sha1hex ASC
+)
+TO '/grande/snapshots/file_meta_dump.tsv'
+WITH NULL '';
+
+ROLLBACK;