From d8060728be781f074d9a8442408d651ef44d570c Mon Sep 17 00:00:00 2001 From: f Date: Sat, 23 Apr 2022 19:32:55 -0300 Subject: [PATCH] =?UTF-8?q?mantener=20el=20d=C3=ADa=20anterior=20completo?= =?UTF-8?q?=20en=20la=20base=20de=20datos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/access_logs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/access_logs b/bin/access_logs index 2b4fd99f..a7c151cc 100755 --- a/bin/access_logs +++ b/bin/access_logs @@ -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 < "/srv/http/_storage/${date}.psql.gz" begin;