]> err.no Git - dak/commitdiff
debian/cron.hourly: Dump & push the external_files table to security
authorGergely Nagy <algernon@madhouse-project.org>
Sun, 16 Sep 2012 18:56:45 +0000 (18:56 +0000)
committerGergely Nagy <algernon@madhouse-project.org>
Mon, 17 Sep 2012 08:55:59 +0000 (08:55 +0000)
To make the external_files table useful, it needs to be populated. But
it only needs to have that on security, so lets export 7 push the
table there from cron.hourly. (Commented out for now, pending info)

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
config/debian/cron.hourly

index fa565c4e7e45adc3b8c93508d27472dc220b0f56..e10365502535b8f2a0bacd183665b72aaa4b4b22 100755 (executable)
@@ -46,6 +46,12 @@ ssh -o Batchmode=yes -o ConnectTimeout=30 -o SetupTimeout=30 -2 -i ${base}/s3kr1
 
 $scriptsdir/generate-di
 
+# Push files over to security
+#pg_dump -a -F p -t files | sed -e "s,^COPY files (,DELETE FROM external_files; COPY external_files (," | xz -3 | \
+#        ssh -o BatchMode=yes -o ConnectTimeout=30 -o SetupTimeout=30 -2 -i ${base}/s3kr1t/push-external_files dak@wherever sync
+#
+# The key should run the following command:
+#        'xzcat | pg_restore -1 -a'
 
 # do the buildd key updates
 BUILDDFUN=$(mktemp -p "${TMPDIR}" BUILDDFUN.XXXXXX)