From 5284febc39f87dc9dcd4637d894d63fd9ae229ef Mon Sep 17 00:00:00 2001 From: shimilgithub Date: Fri, 19 Apr 2024 11:07:57 +0530 Subject: [PATCH] changes in destination directory --- docker/docker-compose.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 9d0255cd..ce46ff25 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -514,33 +514,33 @@ services: labels: ofelia.job-local.copy-vachan-backup-daily.schedule: "0 0 3 * * *" # Copies latest dump from DB container every day at 03:00 am - ofelia.job-local.copy-vachan-backup-daily.command: sh -c "if [ -d /mnt/vachanapi_backup/backups ]; then cp /var/backups/vachan/vachan_db_backup_latest.sql /var/backup-copies/vachan_db_backup_daily_`date +%Y-%m-%d_%H_%M_%S`.sql && echo `date`':Daily backup successful(vachan-db)' >> /app/logs/backup.log || echo `date`':Daily backup failed(vachan)' >> /app/logs/backup.log; else echo `date`':Skipping backup as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" + ofelia.job-local.copy-vachan-backup-daily.command: sh -c "if [ -d /mnt/vachanapi_backup ]; then cp /var/backups/vachan/vachan_db_backup_latest.sql /var/backup-copies/vachan_db_backup_daily_`date +%Y-%m-%d_%H_%M_%S`.sql && echo `date`':Daily backup successful(vachan-db)' >> /app/logs/backup.log || echo `date`':Daily backup failed(vachan)' >> /app/logs/backup.log; else echo `date`':Skipping backup as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" ofelia.job-local.prune-vachan-daily-backup.schedule: "0 0 0 * * *" # Retains only latest 7 of the daily backups - ofelia.job-local.prune-vachan-daily-backup.command: sh -c "if [ -d /mnt/vachanapi_backup/backups ]; then ls -tr /var/backup-copies/vachan_db_backup_daily* | head -n -7 | xargs rm -f -- && echo `date`':Daily Prune successful(vachan-db)' >> /app/logs/backup.log || echo `date`':Daily Prune failed(vachan)' >> /app/logs/backup.log; else echo `date`':Skipping prune as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" + ofelia.job-local.prune-vachan-daily-backup.command: sh -c "if [ -d /mnt/vachanapi_backup ]; then ls -tr /var/backup-copies/vachan_db_backup_daily* | head -n -7 | xargs rm -f -- && echo `date`':Daily Prune successful(vachan-db)' >> /app/logs/backup.log || echo `date`':Daily Prune failed(vachan)' >> /app/logs/backup.log; else echo `date`':Skipping prune as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" ofelia.job-local.copy-vachan-backup-weekly.schedule: "0 0 3 ? * SUN" # Copies latest dump on every sunday 03:00 am - ofelia.job-local.copy-vachan-backup-weekly.command: sh -c "if [ -d /mnt/vachanapi_backup/backups ]; then cp /var/backups/vachan/vachan_db_backup_latest.sql /var/backup-copies/vachan_db_backup_weekly_`date +%Y-%m-%d_%H_%M_%S`.sql && echo `date`':Weekly backup successful(vachan-db)' >> /app/logs/backup.log || echo `date`':Weekly backup failed(vachan)' >> /app/logs/backup.log; else echo `date`':Skipping backup as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" + ofelia.job-local.copy-vachan-backup-weekly.command: sh -c "if [ -d /mnt/vachanapi_backup]; then cp /var/backups/vachan/vachan_db_backup_latest.sql /var/backup-copies/vachan_db_backup_weekly_`date +%Y-%m-%d_%H_%M_%S`.sql && echo `date`':Weekly backup successful(vachan-db)' >> /app/logs/backup.log || echo `date`':Weekly backup failed(vachan)' >> /app/logs/backup.log; else echo `date`':Skipping backup as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" ofelia.job-local.prune-vachan-weekly-backup.schedule: "0 0 0 ? * SUN" # Retains only latest 4 of the weekly backups - ofelia.job-local.prune-vachan-weekly-backup.command: sh -c "if [ -d /mnt/vachanapi_backup/backups ]; then ls -tr /var/backup-copies/vachan_db_backup_weekly* | head -n -4 | xargs rm -f -- && echo `date`':Weekly Prune successful(vachan-db)' >> /app/logs/backup.log || echo `date`':Weekly Prune failed(vachan)' >> /app/logs/backup.log; else echo `date`':Skipping prune as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" + ofelia.job-local.prune-vachan-weekly-backup.command: sh -c "if [ -d /mnt/vachanapi_backup]; then ls -tr /var/backup-copies/vachan_db_backup_weekly* | head -n -4 | xargs rm -f -- && echo `date`':Weekly Prune successful(vachan-db)' >> /app/logs/backup.log || echo `date`':Weekly Prune failed(vachan)' >> /app/logs/backup.log; else echo `date`':Skipping prune as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" ofelia.job-local.copy-vachan-backup-monthly.schedule: "0 0 3 1 * *" # Copies latest dump on first day of every month - ofelia.job-local.copy-vachan-backup-monthly.command: sh -c "if [ -d /mnt/vachanapi_backup/backups ]; then cp /var/backups/vachan/vachan_db_backup_latest.sql /var/backup-copies/vachan_db_backup_monthly_`date +%Y-%m-%d_%H_%M_%S`.sql && echo `date`':Monthly backup successful(vachan-db)' >> /app/logs/backup.log || echo `date`':Monthly backup failed(vachan)' >> /app/logs/backup.log; else echo `date`':Skipping backup as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" + ofelia.job-local.copy-vachan-backup-monthly.command: sh -c "if [ -d /mnt/vachanapi_backup ]; then cp /var/backups/vachan/vachan_db_backup_latest.sql /var/backup-copies/vachan_db_backup_monthly_`date +%Y-%m-%d_%H_%M_%S`.sql && echo `date`':Monthly backup successful(vachan-db)' >> /app/logs/backup.log || echo `date`':Monthly backup failed(vachan)' >> /app/logs/backup.log; else echo `date`':Skipping backup as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" ofelia.job-local.prune-vachan-monthly-backup.schedule: "0 0 0 1 * *" # Retains only latest 12 of the montly dumps - ofelia.job-local.prune-vachan-monthly-backup.command: sh -c "if [ -d /mnt/vachanapi_backup/backups ]; then ls -tr /var/backup-copies/vachan_db_backup_monthly* | head -n -12 | xargs rm -f -- && echo `date`':Monthly Prune successful(vachan-db)' >> /app/logs/backup.log || echo `date`':Monthly Prune failed(vachan)' >> /app/logs/backup.log; else echo `date`':Skipping prune as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" + ofelia.job-local.prune-vachan-monthly-backup.command: sh -c "if [ -d /mnt/vachanapi_backup ]; then ls -tr /var/backup-copies/vachan_db_backup_monthly* | head -n -12 | xargs rm -f -- && echo `date`':Monthly Prune successful(vachan-db)' >> /app/logs/backup.log || echo `date`':Monthly Prune failed(vachan)' >> /app/logs/backup.log; else echo `date`':Skipping prune as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" ofelia.job-local.copy-vachan-backup-yearly.schedule: "0 0 3 1 JAN *" # Copies latest dump on first day of every year - ofelia.job-local.copy-vachan-backup-yearly.command: sh -c "if [ -d /mnt/vachanapi_backup/backups ]; then cp /var/backups/vachan/vachan_db_backup_latest.sql /var/backup-copies/vachan_db_backup_yearly_`date +%Y-%m-%d_%H_%M_%S`.sql && echo `date`':Yearly backup successful(vachan-db)' >> /app/logs/backup.log || echo `date + ofelia.job-local.copy-vachan-backup-yearly.command: sh -c "if [ -d /mnt/vachanapi_backup ]; then cp /var/backups/vachan/vachan_db_backup_latest.sql /var/backup-copies/vachan_db_backup_yearly_`date +%Y-%m-%d_%H_%M_%S`.sql && echo `date`':Yearly backup successful(vachan-db)' >> /app/logs/backup.log || echo `date ofelia.job-local.copy-kratos-backup-daily.schedule: "0 0 4 * * *" # Copies latest dump from DB container every day at 04:00 am - ofelia.job-local.copy-kratos-backup-daily.command: sh -c "if [ -d /mnt/vachanapi_backup/backups ]; then cp /var/backups/kratos/kratos_db_backup_latest.sql /var/backup-copies/kratos_db_backup_daily_`date +%Y-%m-%d_%H_%M_%S`.sql && echo `date`':Daily backup successful(kratos)' >> /app/logs/backup.log || echo `date`':Daily backup failed(kratos)' >> /app/logs/backup.log; else echo `date`':Skipping backup as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" + ofelia.job-local.copy-kratos-backup-daily.command: sh -c "if [ -d /mnt/vachanapi_backup ]; then cp /var/backups/kratos/kratos_db_backup_latest.sql /var/backup-copies/kratos_db_backup_daily_`date +%Y-%m-%d_%H_%M_%S`.sql && echo `date`':Daily backup successful(kratos)' >> /app/logs/backup.log || echo `date`':Daily backup failed(kratos)' >> /app/logs/backup.log; else echo `date`':Skipping backup as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" ofelia.job-local.prune-kratos-daily-backup.schedule: "0 0 1 * * *" # Retains only latest 7 of the daily backups - ofelia.job-local.prune-kratos-daily-backup.command: sh -c "if [ -d /mnt/vachanapi_backup/backups ]; then ls -tr /var/backup-copies/kratos_db_backup_daily* | head -n -7 | xargs rm -f -- && echo `date`':Daily Prune successful(kratos)' >> /app/logs/backup.log || echo `date`':Daily Prune failed(kratos)' >> /app/logs/backup.log; else echo `date`':Skipping prune as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" + ofelia.job-local.prune-kratos-daily-backup.command: sh -c "if [ -d /mnt/vachanapi_backup ]; then ls -tr /var/backup-copies/kratos_db_backup_daily* | head -n -7 | xargs rm -f -- && echo `date`':Daily Prune successful(kratos)' >> /app/logs/backup.log || echo `date`':Daily Prune failed(kratos)' >> /app/logs/backup.log; else echo `date`':Skipping prune as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" ofelia.job-local.copy-kratos-backup-weekly.schedule: "0 0 4 ? * SUN" # Copies latest dump on every sunday 04:00 am - ofelia.job-local.copy-kratos-backup-weekly.command: sh -c "if [ -d /mnt/vachanapi_backup/backups ]; then cp /var/backups/kratos/kratos_db_backup_latest.sql /var/backup-copies/kratos_db_backup_weekly_`date +%Y-%m-%d_%H_%M_%S`.sql && echo `date`':Weekly backup successful(kratos)' >> /app/logs/backup.log || echo `date`':Weekly backup failed(kratos)' >> /app/logs/backup.log; else echo `date`':Skipping backup as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" + ofelia.job-local.copy-kratos-backup-weekly.command: sh -c "if [ -d /mnt/vachanapi_backup ]; then cp /var/backups/kratos/kratos_db_backup_latest.sql /var/backup-copies/kratos_db_backup_weekly_`date +%Y-%m-%d_%H_%M_%S`.sql && echo `date`':Weekly backup successful(kratos)' >> /app/logs/backup.log || echo `date`':Weekly backup failed(kratos)' >> /app/logs/backup.log; else echo `date`':Skipping backup as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" ofelia.job-local.prune-kratos-weekly-backup.schedule: "0 1 0 ? * SUN" # Retains only latest 4 of the weekly backups - ofelia.job-local.prune-kratos-weekly-backup.command: sh -c "if [ -d /mnt/vachanapi_backup/backups ]; then ls -tr /var/backup-copies/kratos_db_backup_weekly* | head -n -4 | xargs rm -f -- && echo `date`':Weekly Prune successful(kratos)' >> /app/logs/backup.log || echo `date`':Weekly Prune failed(kratos)' >> /app/logs/backup.log; else echo `date`':Skipping prune as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" + ofelia.job-local.prune-kratos-weekly-backup.command: sh -c "if [ -d /mnt/vachanapi_backup ]; then ls -tr /var/backup-copies/kratos_db_backup_weekly* | head -n -4 | xargs rm -f -- && echo `date`':Weekly Prune successful(kratos)' >> /app/logs/backup.log || echo `date`':Weekly Prune failed(kratos)' >> /app/logs/backup.log; else echo `date`':Skipping prune as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" ofelia.job-local.copy-kratos-backup-monthly.schedule: "0 0 4 1 * *" # Copies latest dump on first day of every month - ofelia.job-local.copy-kratos-backup-monthly.command: sh -c "if [ -d /mnt/vachanapi_backup/backups ]; then cp /var/backups/kratos/kratos_db_backup_latest.sql /var/backup-copies/kratos_db_backup_monthly_`date +%Y-%m-%d_%H_%M_%S`.sql && echo `date`':Monthly backup successful(kratos)' >> /app/logs/backup.log || echo `date`':Monthly backup failed(kratos)' >> /app/logs/backup.log; else echo `date`':Skipping backup as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" + ofelia.job-local.copy-kratos-backup-monthly.command: sh -c "if [ -d /mnt/vachanapi_backup]; then cp /var/backups/kratos/kratos_db_backup_latest.sql /var/backup-copies/kratos_db_backup_monthly_`date +%Y-%m-%d_%H_%M_%S`.sql && echo `date`':Monthly backup successful(kratos)' >> /app/logs/backup.log || echo `date`':Monthly backup failed(kratos)' >> /app/logs/backup.log; else echo `date`':Skipping backup as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" ofelia.job-local.prune-kratos-monthly-backup.schedule: "0 0 1 1 * *" # Retains only latest 12 of the montly dumps - ofelia.job-local.prune-kratos-monthly-backup.command: sh -c "if [ -d /mnt/vachanapi_backup/backups ]; then ls -tr /var/backup-copies/kratos_db_backup_monthly* | head -n -12 | xargs rm -f -- && echo `date`':Monthly Prune successful(kratos)' >> /app/logs/backup.log || echo `date`':Monthly Prune failed(kratos)' >> /app/logs/backup.log; else echo `date`':Skipping prune as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" + ofelia.job-local.prune-kratos-monthly-backup.command: sh -c "if [ -d /mnt/vachanapi_backup ]; then ls -tr /var/backup-copies/kratos_db_backup_monthly* | head -n -12 | xargs rm -f -- && echo `date`':Monthly Prune successful(kratos)' >> /app/logs/backup.log || echo `date`':Monthly Prune failed(kratos)' >> /app/logs/backup.log; else echo `date`':Skipping prune as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" ofelia.job-local.copy-kratos-backup-yearly.schedule: "0 0 3 1 JAN *" # Copies latest dump on first day of every year - ofelia.job-local.copy-kratos-backup-yearly.command: sh -c "if [ -d /mnt/vachanapi_backup/backups ]; then cp /var/backups/kratos/kratos_db_backup_latest.sql /var/backup-copies/kratos_db_backup_yearly_`date +%Y-%m-%d_%H_%M_%S`.sql && echo `date`':Yearly backup successful(kratos)' >> /app/logs/backup.log || echo `date`':Yearly backup failed(kratos)' >> /app/logs/backup.log; else echo `date`':Skipping backup as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" + ofelia.job-local.copy-kratos-backup-yearly.command: sh -c "if [ -d /mnt/vachanapi_backup ]; then cp /var/backups/kratos/kratos_db_backup_latest.sql /var/backup-copies/kratos_db_backup_yearly_`date +%Y-%m-%d_%H_%M_%S`.sql && echo `date`':Yearly backup successful(kratos)' >> /app/logs/backup.log || echo `date`':Yearly backup failed(kratos)' >> /app/logs/backup.log; else echo `date`':Skipping backup as vachanapi_backup directory not found' >> /app/logs/backup.log; fi" networks: - VE-network