There was an error while loading. Please reload this page.
1 parent 709633c commit a4a7e70Copy full SHA for a4a7e70
mysql_backup.sh
@@ -35,5 +35,7 @@ umask 177
35
# Dump database into SQL file
36
mysqldump --lock-tables --user=$user --password=$password --host=$host $db_name > $backup_full_name
37
38
+# Set a value to be used to find all backups with the same name
39
+find_backup_name="${backup_location}/${website}/${db_name}-*.sql"
40
# Delete files older than the number of days defined
-find $backup_full_name -mtime +${days} -type f -delete
41
+find $find_backup_name -mtime +$days -type f -delete
0 commit comments