5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 17:46:21 +00:00

mantener el día anterior completo en la base de datos

This commit is contained in:
f 2022-04-23 19:32:55 -03:00
parent 7cbc48d45b
commit d8060728be

View file

@ -1,8 +1,8 @@
#!/bin/sh #!/bin/sh
set -e set -e
# Volcar y eliminar todos los access logs del día anterior # Volcar y eliminar todos los access logs de dos días atrás
date=`date +%F` date=`bundle exec rails runner "puts (Date.today - 2.days)"`
psql -h postgresql "${DATABASE:-sutty}" sutty <<SQL | gzip > "/srv/http/_storage/${date}.psql.gz" psql -h postgresql "${DATABASE:-sutty}" sutty <<SQL | gzip > "/srv/http/_storage/${date}.psql.gz"
begin; begin;