mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 15:31:43 +00:00
mantener el día anterior completo en la base de datos
This commit is contained in:
parent
7cbc48d45b
commit
d8060728be
1 changed files with 2 additions and 2 deletions
|
@ -1,8 +1,8 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Volcar y eliminar todos los access logs del día anterior
|
||||
date=`date +%F`
|
||||
# Volcar y eliminar todos los access logs de dos días atrás
|
||||
date=`bundle exec rails runner "puts (Date.today - 2.days)"`
|
||||
|
||||
psql -h postgresql "${DATABASE:-sutty}" sutty <<SQL | gzip > "/srv/http/_storage/${date}.psql.gz"
|
||||
begin;
|
||||
|
|
Loading…
Reference in a new issue