X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fcommon;h=f5ec8ae630ae8a42696c7e5d158c5db2c2607ac0;hb=b6cf40a404bec1867ad0e5298ce08857dabb16f9;hp=f611c19e55b22dffe4ee5f60cdeee3805819d889;hpb=f1e3abea4079e50b95c189fc00e06b119f24c165;p=dak.git diff --git a/config/debian/common b/config/debian/common index f611c19e..f5ec8ae6 100644 --- a/config/debian/common +++ b/config/debian/common @@ -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) +}