Download & Extend

Rotation cleanup leaves info files

Project:Backup and Migrate
Version:7.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

When using scheduled backups with a cleanup rotation, actual backup files are properly removed, but the association .info files describing the deleted backups remain in the target directory.

Comments

#1

I'm seeing this, too.

~/shared/private/backup_migrate/scheduled/daily $ ls
MySite-2012-05-16T11-56-04.mysql.gz.info
MySite-2012-05-17T13-10-42.mysql.gz.info
MySite-2012-05-18T14-02-54.mysql.gz.info
MySite-2012-05-19T13-49-09.mysql.gz.info
MySite-2012-05-20T14-50-53.mysql.gz.info
MySite-2012-05-21T16-34-42.mysql.gz.info
MySite-2012-05-22T10-30-40.mysql.gz.info
MySite-2012-05-22T10-31-46.mysql.gz
MySite-2012-05-22T10-31-46.mysql.gz.info
MySite-2012-05-23T11-45-54.mysql.gz
MySite-2012-05-23T11-45-54.mysql.gz.info
MySite-2012-05-24T13-07-34.mysql.gz
MySite-2012-05-24T13-07-34.mysql.gz.info

#2

Version:7.x-2.x-dev» 7.x-2.4

This is also happening in the new 7.x-2.4 version as well for both manual and scheduled backups.

filename = "EarthSpaceSciencePartnership-2012-06-05T09-55-19"
description = ""
datestamp = "1338904519"
generator = "Backup and Migrate (http://drupal.org/project/backup_migrate)"
generatorversion = "7.x-2.x"
sites[0][version] = "7.14"
sites[0][name] = "Earth Space Science Partnership"
sites[0][url] = "http://d7.essp.psu.edu/"

Eric

#3

I'm getting the same behavior as described in #2.

#4

The function remove_expired_backups() in includes/schedules.inc is responsible for deleting expired backup files, but it ignores the corresponding .info files.

There are several functions involved in creating and reading metadata from .info files: save_file_info(), create_info_file(), and load_files_info() in includes/destinations.inc

#5

Version:7.x-2.4» 7.x-2.x-dev

Leaving orphaned files does not seem minor.

What is the purpose of storing such metadata in these .info files?

#6

Priority:minor» normal

I agree not minor, but the files are small.

Also if you look at one of the .info files you'll see it's useful information that can't be easily retrieved from inside a gzip file. And I suppose it gets stored as an .info file because Drupal can easily read and write that format.

#7

Status:active» needs review

Here's a patch. It seems to work for file destinations. I don't have the resources at the moment to do a thorough test.

AttachmentSize
backup_migrate-infofiles_1555742.patch 1.49 KB

#8

I'm also experiencing the problem with the .info files piling up on the server.

#9

Patch at #7 works for me. When I manually delete files listed in destinations, the .info files get removed as expected.
B&M 7.x-2.4
Drupal 7.14

#10

Status:needs review» reviewed & tested by the community

Marking RTBC, so we can hopefully get some movement on this. :-)

#11

Also reporting the same behavior as #2.

#12

@rodmaz - are you reporting this before or after applying the patch at #7?

#13

Status:reviewed & tested by the community» fixed

This should be fixed in the latest dev. Thanks all.

#14

Ossum, thanks.

#15

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.