From 604e2821f878c62c76b6f969b222729971fc41e3 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 4 Aug 2016 11:33:19 -0700 Subject: [PATCH] Remove tools/deprecated/backup. --- tools/deprecated/backup | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100755 tools/deprecated/backup diff --git a/tools/deprecated/backup b/tools/deprecated/backup deleted file mode 100755 index 2651776ca9..0000000000 --- a/tools/deprecated/backup +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash -set -ex - -cd /home/tabbott/zulip-backups -log="$(pwd)"/log - -# Redirect output to a log file, with timestamps. -# Save original stderr as fd 3. -exec 3>&2 > >(ts >> "$log") 2>&1 - -# On error, print the log file to original stderr, so I get mail. -function handle_error { - echo 'Error occurred while running backup' >&3 - tail "$log" >&3 - exit 1 -} -trap handle_error ERR - -function commit { - git commit --allow-empty -a -m '[AUTO] backup' - git repack -da -} - -cd message_logs -for h in staging.zulip.net prod0.zulip.net; do - rsync -v zulip@$h:logs/event_log/events.* . -done -git add events.* -commit - -rsync -az root@prod0.zulip.net:/srv/www/dist dist/ -commit - -cd ../wiki -ssh root@trac.zulip.net php /usr/share/mediawiki/maintenance/dumpBackup.php --full > mediawiki.xml -commit