FAQ
Dear Everybody!

We have a redmine server with linux.
I wrote some pythonic tool that backup the redmine (files and
database) and put to ftp server.

This was working fine.

But today I checked, and I saw this failed in the prior week.
As I checked more, I saw that part. is out of space.
I stored the files, logs, dumps in the /home, and this dev. is out of
space.

Then I tried to move to /var/www/redmine_backup folder.

And then I got result what I don't understand.

In root mode I set the user on every file and directory, and set the
mode to 777, and set sticky bit, and user/group on execution.
Everything is same, but when I check os.listdir() on this dir, I see
only two folders.

5 elements are here:
Files_Zipped (dir)
MySQL_Dump (dir)
Log (dir)
Log2 (dir)
BackupRedmine.py (the script)

The listdir show only:
Files_Zipped
MySQL_Dump

(It don't see itself!)

Because it don't see the Log dir, try to make it, and it have been
failed...

I checked all things in MC too, but I cannot find the differents...
May this is Python bug?

xuser at h2182:~$ /var/www/backup_redmine/BackupRedMine.py /log
RedMine Backup V1.0
Log mode
Make and get backup path
Try to make /var/www/redmine_backup/Log
Traceback (most recent call last):
File "/var/www/backup_redmine/BackupRedMine.py", line 239, in <module>
logfilename = MakeBackupPath(_SubPath_Log) + '/log_' + NowStr
File "/var/www/backup_redmine/BackupRedMine.py", line 78, in
MakeBackupPath
os.makedirs(path)
File "/usr/lib/python2.5/os.py", line 171, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/var/www/redmine_backup/Log'

xuser at h2182:/var/www/backup_redmine$ ./BackupRedMine.py /log
RedMine Backup V1.0
Log mode
Make and get backup path (os.listdir)
['Files_Zipped', 'MySQL_Dump']
xuser at h2182:/var/www/backup_redmine$ ls -l
total 24
-rwxrwxrwt 1 xuser xuser 7350 2011-03-29 10:47 BackupRedMine.py
drwsrwsrwt 2 xuser xuser 4096 2011-03-29 09:46 Files_Zipped
drwsrwsrwt 2 xuser xuser 4096 2011-03-29 10:36 Log
drwsrwsrwt 2 xuser xuser 4096 2011-03-29 10:42 Log2
drwsrwsrwt 2 xuser xuser 4096 2011-03-29 09:46 MySQL_Dump

But interesting thing is that everything is working good on /home.

So it is seems to be right problem, but what is the different?

What can I do?

Thanks:
dd

Search Discussions

  • Durumdara at Mar 29, 2011 at 12:39 pm
    Hi!

    Sorry. The path was wrong! "backup_redmine <> redmine_backup"... :-(

    Thanks:
    dd

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMar 29, '11 at 9:28a
activeMar 29, '11 at 12:39p
posts2
users1
websitepython.org

1 user in discussion

Durumdara: 2 posts

People

Translate

site design / logo © 2022 Grokbase