Commit 5a384d9c authored by Antoine Catton's avatar Antoine Catton Committed by Cédric de Saint Martin

Fix mariadb backup.

The file moving was not working if the dump.sql.gz was already
here.
parent 9e505781
......@@ -309,7 +309,7 @@ class Recipe(BaseSlapRecipe):
mysql_backup_cron = os.path.join(self.cron_d, 'mysql_backup')
with open(mysql_backup_cron, 'w') as file_:
file_.write('0 0 * * * %(mysqldump)s | %(gzip)s > %(tmpdump)s' \
'&& mv %(tmpdump)s %(dumpfile)s' % {
'&& mv -f %(tmpdump)s %(dumpfile)s' % {
'mysqldump': mysqldump_cmdline_str,
'gzip': self.options['gzip_binary'],
'tmpdump': self.parseCmdArgument(tmpdump_file),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment