]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian/common
database backup foo
[dak.git] / config / debian / common
index f611c19e55b22dffe4ee5f60cdeee3805819d889..f5ec8ae630ae8a42696c7e5d158c5db2c2607ac0 100644 (file)
@@ -104,3 +104,9 @@ function reports() {
     dak cruft-report -s experimental >> $webdir/cruft-report-daily.txt
     cat $webdir/cruft-report-daily.txt | mail -a "X-Debian: DAK" -e -s "Debian archive cruft report for $(date +%D)" ftpmaster@ftp-master.debian.org -- -F "Debian FTP Masters" -f ftpmaster@ftp-master.debian.org
 }
+
+function pg_timestamp() {
+    tsname=${1:-"unknown"}
+    log "Saving postgres transaction id for ${tsname}"
+    psql -tAc 'select txid_current();' > $base/backup/txid_${tsname}_$(date +%Y.%m.%d-%H:%M:%S)
+}