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:
parent
7cbc48d45b
commit
d8060728be
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue