Skip to content
This repository has been archived by the owner on Jun 18, 2021. It is now read-only.

ome-dundeeomero backup script Fix: can't use sudo from /etc/cron #279

Merged
merged 1 commit into from
Jul 5, 2017

Conversation

kennethgillen
Copy link
Member

@kennethgillen kennethgillen commented Jul 4, 2017

An update to address the fact that the nightly backup was failing, though testing at the shell was successful.

Check mode against ome-dundeeomero: ansible_run-backup-script-CHECK-ome-dundeeomero_20170704-120625Z.txt

Live run against ome-dundeeomero: ansible_run-backup-script-UPDATE-ome-dundeeomero_20170704-120909Z.txt

Without this PR

[root@ome-dundeeomero cron.daily]# run-parts  /etc/cron.daily/ -v
[root@ome-dundeeomero cron.daily]# du -sh /backups/*
64K    /backups/nightly-pg_dump_omero.dir

With this PR

[root@ome-dundeeomero cron.daily]# run-parts  /etc/cron.daily/ -v
[root@ome-dundeeomero cron.daily]# du -sh /backups/*
1.7G    /backups/nightly-pg_dump_omero.dir

@joshmoore
Copy link
Member

Oh, I'm glad this got caught earlier rather than later!

@kennethgillen
Copy link
Member Author

Yep, agree with those sentiments for sure. I'd dallied adding the backup file size/age monitoring - that's still not in place, I prioritised omero-user-sessions (unique users and total sessions), but on the server upgrades running manual dumps I noticed the du was off.

@kennethgillen
Copy link
Member Author

Can confirm:

[root@ome-dundeeomero ~]# date && du -sh /backups/*
Wed  5 Jul 09:35:50 BST 2017
1.7G    /backups/nightly-pg_dump_omero.dir

@manics
Copy link
Member

manics commented Jul 5, 2017

Code looks fine, can't actually see it in action though.

There's a mysql-backup role: https://github.com/openmicroscopy/ansible-role-mysql-backup
If you create something similar for postgres it'll be easier to deploy on other servers.

@kennethgillen
Copy link
Member Author

@manics - if you're happy with #279 (comment) showing it works, care to merge, or 👍 for merge?

@joshmoore
Copy link
Member

cF. https://github.com/openmicroscopy/ansible-role-mysql-backup/blob/master/templates/etc-crond-mysql-backup.j2

Agreed that that looks like a good solution, but additionally 👍 for this being fixed and getting it in ASAP.

@joshmoore joshmoore merged commit 2c3db62 into ome:master Jul 5, 2017
@kennethgillen kennethgillen deleted the update_backup_script branch July 5, 2017 13:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants