Active
Project:
Backup Files
Version:
6.x-6.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
27 Nov 2008 at 22:43 UTC
Updated:
16 Dec 2008 at 13:46 UTC
I get a nice list when I click the test. my paths to required modules says ok. `sorry - i'm sure more info would help but don't know what else to include.
Comments
Comment #1
danmc commentedadditional info: this error shows on reloading site home node after running the backup files.
* warning: filesize() [function.filesize]: stat failed for /backup.tgz in /home4/clubtaco/public_html/upvbc/sites/all/modules/backup_files/backup_files.module on line 216.
* warning: fopen(/backup.tgz) [function.fopen]: failed to open stream: No such file or directory in /home4/clubtaco/public_html/upvbc/sites/all/modules/backup_files/backup_files.module on line 220.
Comment #2
Steve Lockwood commentedA couple of suggestions:
1) First, when you click "Test" do you see a list of files to be backed up like this:
Array
(
[0] => .\sites\default\files\backup_migrate\.htaccess
[1] => .\sites\default\files\backup_migrate\manual\test.txt
[2] => .\sites\default\files\backup_migrate\manual\xxxxx_drupal6_xxxxx-2008-11-15T17-05-01.sql.gz
[3] => .\sites\default\files\backup_migrate\scheduled\test.txt
[4] => .\sites\default\files\images\temp\Drupal_Content_Management.pdf
[5] => .\sites\default\files\images\temp\stockxpertcom_id2565441_size0.jpg
[6] => .\sites\default\files\images\temp\stockxpertcom_id2565441_size0_0.jpg
)
If you do not see a list of files then the "Directories to back up" parameter is not properly specified. You might need to play around with this - it doesn't need a / at the start, eg sites/mysite/files
2) The temporary backup files is written to the module directory, {basepath}/sites/all/modules/backup_files/backup.tgz. YOu need to make sure that this is writable.
I hope this helps.
Steve
Comment #3
danmc commented1) yes - "Test" gives a nice-complete list of files for backing up.
2) the file backup.tgz is not present - should it be? The folder is writable 775
- the 0 size file gets saved locally, nothing in backup_files folder, this error shows after reload:
* warning: filesize() [function.filesize]: stat failed for /backup.tgz in {basepath}/sites/all/modules/backup_files/backup_files.module on line 216.
* warning: fopen(/backup.tgz) [function.fopen]: failed to open stream: No such file or directory in {basepath}/sites/all/modules/backup_files/backup_files.module on line 220.
* warning: filesize() [function.filesize]: stat failed for /backup.tgz in {basepath}/sites/all/modules/backup_files/backup_files.module on line 216.
* warning: fopen(/backup.tgz) [function.fopen]: failed to open stream: No such file or directory in {basepath}/sites/all/modules/backup_files/backup_files.module on line 220.
Comment #4
Steve Lockwood commentedWhat I said in 2) above is incorrect (sorry) - the backup file is saved in the Drupal temporary files location. But, if you have not specifically set this, Drupal uses the operating system default value (/etc/temp or c:\windows\temp or something like that). The backup_files module does not handle this situation very well and the resulting file may not be accessible to the web server and can not be downloaded by the user.
I think the trick is to set the temp files location using admin/settings/file_system and setting the temporary directory to be somewhere which is readable by the web server - eg {basepath}/sites/{sitename}/file/temp - and making sure the directory exists before you run the backup_files.
(Note, if the backup file is located in the same directory as the one being backed up it should not create a problem - the software is programmed to avoid backing up the file it is writing to!)
Steve
Comment #5
danmc commentedThat worked for me - setting the temp files location other than default - I created a temp folder within the files folder. This is solved for me :) Thanks!
Comment #6
butler360 commentedI had the same problem and for me it was as easy as creating a tmp directory in the drupal root and then making it 775.
Comment #7
dinknaround commentedWell, nothing mentioned above has worked for me, installed on D6.
When I click "Test Settings" I do not see a list of files to be backed up in the Array ().
I also get message: Does not exist: sites/default/files
When I click "Backup", I do get a compressed file to download, but it is empty.
Any other solutions?
Comment #8
Steve Lockwood commentedThis suggests that the directory you are asking to be backed up does not exist.
Using admin/settings/file_system:
- specify (or accept the default values) for the sys files directory and the temp directory
- make sure that they both exist and are accessible to the web server (for example in windows hosting the temp directory will be C:\temp which is not accessible)
Then make sure that the correct directory is specified in backup_files
Comment #9
bsimon commentedThis issue can occur with 6.x-1.1 as well as the 6.x-6.x-dev version specified.
This is very strange. As far as I can see, Drupal comes with a default path for a Temporary directory, which is /tmp. So I can't understand why the archived Drupal installation file doesn't simply include an empty /tmp directory in its root... seems obvious, but it's not there
Perhaps tmp is only created when you switch to private file system... ?
Anyway, maybe this issue should be in the readme for Backup Files... that you might need to create a tmp folder in your drupal root directory.
Unlike #6, in my case 755 permission on /tmp is enough
+ By the way, at the moment, this fix creates a file /tmp/backup.tgz which is publicly readable, which is probably a security problem. In fact definitely a security problem if you're using Backup and Migrate, and you then use Backup Files to backup (for example) your entire /sites directory, because that contains Backup and Migrate's copies of your database...
++ edit: the answer to the security issue is to create this .htaccess file in the tmp directory
order allow,deny
deny from all
This seems to work, I hope it doesn't break anything else...