From e2c0e7e5166d2053ba4ac785bbd43ffc1cd909c2 Mon Sep 17 00:00:00 2001 From: Jeremie Courreges-Anglas Date: Wed, 9 May 2018 17:57:13 +0200 Subject: [PATCH] Respect tmp_dir, fixes temp files removal --- libtisbackup/backup_pgsql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libtisbackup/backup_pgsql.py b/libtisbackup/backup_pgsql.py index 70bc5ed..9c6172a 100644 --- a/libtisbackup/backup_pgsql.py +++ b/libtisbackup/backup_pgsql.py @@ -129,7 +129,7 @@ class backup_pgsql(backup_generic): stats['log'] = '%s "%s"' % (stats['log'] ,self.db_name) stats['backup_location'] = self.dest_dir - cmd = 'rm -f /tmp/' + self.db_name + '-' + backup_start_date + '.sql.gz' + cmd = 'rm -f %(tmp_dir)s/%(db_name)s-%(backup_start_date)s.sql.gz' % params self.logger.debug('[%s] %s ',self.backup_name,cmd) if not self.dry_run: (error_code,output) = ssh_exec(cmd,ssh=self.ssh)