cytopia / mysqldump-secure

[sh] Encrypted mysqldump script with compression, logging, blacklisting and Nagios/Icinga monitoring integration
https://mysqldump-secure.org
147 stars 38 forks source link

Enhancement - tmpreaper on Ubuntu #11

Closed hbokh closed 9 years ago

hbokh commented 9 years ago

This really made my day, thanks heaps for this solution! I altered the script locally to make use of "tmpreaper" on Ubuntu, since "tmpwatch" is unavailable. The used options remain the same. Maybe it's possible to include this as an option in a next release?

cytopia commented 9 years ago

Can you post the changes you made, so I can have a look at it. Is tmpwatch generally unavailable on Ubuntu?

hbokh commented 9 years ago

Here is a diff: https://gist.github.com/hbokh/f56c253e9064d923cde1

This morning it turned out I also had to put in a PATH-line, since /usr/sbin/tmpreaper was not found by the script AND also had to include a -f (force) to delete older files:

2015-08-05 09:14:01 Non-writeable file, owned by UID (0) skipped: `2015-08-04_2015__database.sql.gz.enc'

There is no tmpwatch in a default package-repository in Ubuntu indeed. Also see http://superuser.com/a/501466/74190 Hope this helps.

cytopia commented 9 years ago

I added the tmpreaper integration into the develop branch.

For the -f issue, I will need to do some research before implementing it as a default option. visit the issue here https://github.com/cytopia/mysqldump-secure/issues/12

cytopia commented 9 years ago

Added in master branch and scheduled for next release