Backup filename errors!

Backup filename errors!

by Niall MacKenzie -
Number of replies: 1

You'll like this one....

One of our users (creators) had the bright idea of backing up his course to his hard drive. Fair enough, always a good idea to be careful. However, he named the backup zip file "c:\\backup-6017...." thinking it would download it straight to his machine.

So we now have a file in the backup folder that cannot be renamed or deleted. The "c:\\" in the filename confuses Moodle:

Warning: rename(/WWW/moodledata/14/backupdata/c:\\\\\\\\backup-6017-20041021-1204.zip,/WWW/moodledata/14/backupdata/backup-6017-20041021-1204.zip): No such file or directory in /WWW/moodle/files/index.php on line 236
Error: could not rename c:\\\\\\\\backup-6017-20041021-1204.zip to backup-6017-20041021-1204.zip

Our server administrator is worried that a manual deletion of the file might compromise data integrity. Is that a legitimate worry?

Niall

Average of ratings: -
In reply to Niall MacKenzie

Re: Backup filename errors!

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
It is safe to delete this file using shell. Anyway you should not keep any backups in moodle data directory for security reasons. Automatic backups should be  stored outside moodle web and data directory. Teacher backups should be erased after backup or restore.

We have fixed many file and backup related issues in 1.4.1+, similar problems should be prevented in the future wink

skodak