Following update to latest release the module stopped working. However, on every cron run new files were added to tmp folder, which filled up quickly and eventually crashed the server. A useful feature would be to remove temporary files even where a backup fails.

Comments

ar-jan’s picture

Project: Backup and Migrate Dropbox » Backup and Migrate
Version: 7.x-1.0-alpha0 » 7.x-2.x-dev

I think this is a backup_migrate issue; I'm not using backup_migrate_dropbox but I have the same problem with failed backups filling up the temp directory, using just backup_migrate module.

ronan’s picture

Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)

Is this still an issue with the latest dev?

John_B’s picture

I could not attempt to reproduce this on the same server without owner's permission, which I will not get. If you think testing a failed backup in a different environment (where I have never seen the problem) would be useful, please say so & will try to reproduce it, though I cannot recall the exact steps to reproduce.

ar-jan’s picture

I suspect the problem had something to do with a large database and max execution time or database server overload during backup (at least in my case). We're no longer using backup_migrate there.

I guess we can close this if no-one can reproduce.

mattbk’s picture

I just received a message from our host that we are creating database backups in the system tmp folder, which seems like it is related to this issue. I told them that all backups in tmp must be leftover and we didn't want them anyway (our backups are small enough to email once created). Is it usually the case that the backup in tmp is deleted automatically?

ronan’s picture

@mattbk, under some circumstances the file is not deleted right away, but if you have cron running frequently on your site then they SHOULD be cleaned up eventually. Let me know if this is not happening.

mattbk’s picture

I was told that there were several files totalling 2 GB when my databases are less than 300 MB. Cron is running every 15 minutes, so maybe there are backups that are not being completed. I am seeing several "Attempting to re-run cron while it is already running." messages in the log, but I don't know if these are related or not.

I will try to look at the system logs to see if anything shows up. Is there a chance that the backup could be created in tmp but not deleted because I don't have access to that directory?

bkeller’s picture

This may be the wrong place for my comment, but am having the same issue with 7.x-3.0
I am having some server timeout issues unrelated to B&M, but it caused the automated scheduled backup to fail.
B&M dutifully continued attempting to run the backups however, but kept leaving files in the tmp folder.
It continued this process until the server disk space was full, and the server crashed.

Obviously I have disabled scheduled backups, but it seems that some sort of check could be put in place so that if a scheduled backup fails, it notifies the system admin or something and doesn't keep trying.

selfuntitled’s picture

Version: 7.x-2.x-dev » 7.x-3.0
Status: Postponed (maintainer needs more info) » Active

Just to confirm, this is definitely still an issue with 2.x and 3.x branch.
My server is running out of space every few weeks due to this problem.
I'm happy to be a guinea pig to explore more fully what's going on.

I'm guessing part of the issue is a configuration problem on my end. That said, it seems like the module should fail gracefully. At the moment, the only way to know there is a problem is 1) see disk is filling up or 2) check private/temp and see backup_migrate*.tar files filling several GB.

Watchdog does show several "could not complete backup" messages, but there's no warning that the partial backups are still sitting around.

I know I have a backup of my sites directory that's failing. I'm wondering if there's an infinite loop created by trying to back up the sites directory to a temp folder that resides in the sites directory, but I haven't figured out how to either specify an alternate temp directory for B&M to use, or explicitly exclude a directory.

John_B’s picture

A quick FYI probably not relevant here: Wodrpress backup plugins (and quite possibly BAM) routinely fail and loop this way when using the Litespeed web server. The fix is a rewrite rule in .htaccess (here http://wordpress.org/support/topic/backwpup-and-litespeed-web-server-solved & elsewhere). Place the rewrite rule in a .htaccess in doc root (may not work in a sub-directory or cPanel 'addon domain').

devad’s picture

I had problem with huge Backup and migrate files being created and not deleted after backup is finished inside .cagefs/tmp folder.

In my case (shared hosting) changing temp folder path from /tmp to ../tmp fixed the issue.

Backup and Migrate module dosen't use any more .cagefs/tmp folder to create it's temp files and in regular tmp folder everything works fine. Huge temp files are properly deleted after backup is finished and even if backup is not successfully finished like in my case when I purposely made insufficient drive space for test purpose.

Tested with: D7.50, Backup and Migrate 7.x-3.1

couturier’s picture

Status: Active » Postponed (maintainer needs more info)

Can you verify if this is still an issue with the latest 7.x-3.2 release?

couturier’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

Closing after more than two weeks with no activity.