Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dejo como backup 24 archivos de los primeros de cada mes #302

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ script:
- DJANGO_SETTINGS_MODULE=distribucion.test_settings coverage run --source=materias,dborrador,encuestas,usuarios --omit=*/migrations/* manage.py test

after_success:
- export COVERALLS_REPO_TOKEN=01ukomYk5xS4USQbV3GABMl5mIkblVIcR
- coveralls
2 changes: 1 addition & 1 deletion nginx_conf/ssl/LEEME
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
* Cambiar en nginx.conf
1. mi_sitio... por el sitio que aparece en el certificado.
1. mi_host.mi_dominio... por el sitio que aparece en el certificado.
2. ssl_certificate y ssl_certificate_key para que apunten a fullchain.pem y privkey.pem
El prefijo /etc/nginx/conf.d/ssl/pems no hay que cambiarlo
porque es lo que figura en docker-compose.yaml
Expand Down
6 changes: 4 additions & 2 deletions tools/distribucion_backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ cd ${DIR}
echo "genero backup"
docker run --rm -v distribucion_pgdata:/source:ro busybox tar -czC /source . > data_backup_$(date "+%F_%T").tar.gz

echo "dejo solo los últimos 30 backups"
ls data_backup*.tar.gz | sort | head -n-30 | xargs rm
echo "dejo solo los últimos 30 backups y los ultimos 24 primeros de mes"
PRIMERO_DE_MES='-[0-9][0-9]-01_[0-9][0-9]:'
ls data_backup*.tar.gz | grep -v -- ${PRIMERO_DE_MES} | sort | head -n-30 | xargs rm
ls data_backup*.tar.gz | grep -- ${PRIMERO_DE_MES} | sort | head -n-24 | xargs rm