nssbackup doesn't backup

Bug #184713 reported by Psykotik
4
Affects Status Importance Assigned to Milestone
nssbackup
Fix Released
Medium
Oumar Aziz OUATTARA

Bug Description

Since a few days, NSsbackup doesn't do its job: selecting the "backup up" icon launch a python process ("python /usr/bin/nssbackupd"), which runs for a few seconds, and stops.

NSsbackup is run as root (gksu nssbackup).

Revision history for this message
Psykotik (linux-ikiru) wrote :
Revision history for this message
Psykotik (linux-ikiru) wrote :

I forgot: I am an Ubuntu 7.10 user.

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

Thank you very much for your bug report.

I have read your nssbackup file and found nothing (it's likely incomplete ) . Can you tell me where did you get it ? in the snapshot directory or in "/media/HD-USB/backup/logs/nssbackup.log" ?

Another information that would be usefull is to know the version of NSsbackup you are using, 0.1-3 or another one ?
you said, "since a few days, NSsbackup doesn't do its job " . So I assume before it was doing it's job fine. Do you know what happened since then ? Nssbackup updates ? Did your change the backup directory or disk ?
Can you launch "nssbackupd" from the terminal and see what happens ?

Changed in nssbackup:
assignee: nobody → wattazoum
status: New → Incomplete
Revision history for this message
Psykotik (linux-ikiru) wrote :

Sorry for missing all these informations. And thanks for your answer, Oumar.

The log I provided comes indeed from /media/HD-USB/backup/logs/nssbackup.log, which is the log folder on my external USB HD. What do you mean by "nssbackup file is incomplete"? How could I manage to get a more complete one?

I use last release of NSsbackup 0.1-3. It is very difficult to know exactly what I did these last days; I know I recently updated NSsbackup, and it *could* be releated... should I downgrade, to confirm this?

Lauching nssbackupd from the terminal gives pretty the same result; I have to close (ctrl+c) the process. I add the log.

I do not change the backup directory nor my backup disk.

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

Thank you very much for doing the test.

If I look at your reports, I would say that the NSsbackup process hadn't finish its job. But the process was still up and running.

This means :
- either there were no problem and you have a lot of files to backup
- or there were a problem and NSsbackup was looping

I can remember some tricky cases of loop that I have once had. And maybe this is the same problem here.

Revision history for this message
Psykotik (linux-ikiru) wrote :

I tried to downgrade to 0.1-1, but it didn't change anything. Well, it actually changes something (see log), but to a crash. If I'm right, I should be able to run nssbackup, removing my regexp rules.

I also let the script (on 0.1-3) running a few time, it doesn't quit or crash, it only keeps running.

I have a huge amount of files to backup, but it used to work with 0.1-1.

Revision history for this message
Psykotik (linux-ikiru) wrote :

I've noticed a very strange behavior... I can't remove preferences, nssbackup keeps somewhere (but where?) its configuration.

I tried to rename /etc/nssbackup.conf, but nssbackup finds something to backup (it runs when I launch nssbackupd). I also renamed /home/user/.config/nssbackup/nssbackup.conf; how can nssbackup manage to run, since there is no more any config file?

I don't understand, but I feel it could be related to my issue; it probably means that nssbackup doesn't read my prefs, if it reads somewhere else another config

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

hello,

Not so strange behaviour, but maybe wrong :-).

About the configuration files :
- the file in $HOME/.config/nssbackup is your user configuration
- the one in /etc/ is the system configuration one.

If you launch NSsbackup and those files are not found, the default configuration is used.
- for users , default won't back anything
- for system (root) , it will use this configuration :
[dirconfig
 {'/etc/': '1',
 '/var/': '1',
'/home/': '1',
'/var/cache/': '0',
'/var/tmp/': '0',
 '/var/spool/': '0',
 '/usr/local/': '1',
'/media/': '0'} ]
so a lot of things will be backed up.

Then this choice was functional but we can change it if there is some reason for that.

Anyway, this isn't the cause of your problem.
I have uploaded to the PPA a new version of NSsbaskup ( 0.1-4~ppa1 ) that includes some fixes. And I made it very verbose on debug mode so that we can try understanding your issue.

Revision history for this message
Psykotik (linux-ikiru) wrote :

Hi Oumar,

Thanks for the explanation, I wondered if I was mad :)

I downloaded last release, which unfortunately doesn't fix my issue: I waited more than 30 minutes, with no result. Moreover, this version doesn't seem to be more verbose than the previous one; have I to activate a new option? I have already selected the debug mode, but the output is rigorously the same.

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

hello,

did you have output like this one :
2008-01-23 20:48:44,354 - DEBUG - BackupManager.py:addtobackup(280) - '/home/wattazoum/workspace/NSsbackup/release0.1/tests/test-datas/backupdir/' is directory, searching in the content

This is the new output I have added. I just want to get were it's looping. so I would like to have your logfile after that.

Revision history for this message
Psykotik (linux-ikiru) wrote :

no, I haven't. Here is the log file. When run in terminal, these lines are also displayed when stopping (ctrl+c) nssbackupd:

Traceback (most recent call last):
  File "/usr/bin/nssbackupd", line 28, in <module>
    sbd.run()
  File "/build/buildd/nssbackup-0.1/debian/nssbackup/usr/lib/python2.5/site-packages/nssbackup/nssbackupd.py", line 118, in run
  File "/build/buildd/nssbackup-0.1/debian/nssbackup/usr/lib/python2.5/site-packages/nssbackup/managers/BackupManager.py", line 155, in makeBackup
  File "/build/buildd/nssbackup-0.1/debian/nssbackup/usr/lib/python2.5/site-packages/nssbackup/managers/BackupManager.py", line 349, in __fillSnapshot
  File "/build/buildd/nssbackup-0.1/debian/nssbackup/usr/lib/python2.5/site-packages/nssbackup/managers/BackupManager.py", line 292, in addtobackup
  File "/build/buildd/nssbackup-0.1/debian/nssbackup/usr/lib/python2.5/site-packages/nssbackup/managers/BackupManager.py", line 292, in addtobackup
  File "/build/buildd/nssbackup-0.1/debian/nssbackup/usr/lib/python2.5/site-packages/nssbackup/managers/BackupManager.py", line 297, in addtobackup
  File "/build/buildd/nssbackup-0.1/debian/nssbackup/usr/lib/python2.5/site-packages/nssbackup/managers/BackupManager.py", line 217, in isexcludedbyconf
KeyboardInterrupt

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

hello,

Thank you very much to have given me your KeyboardInterrupt stacktrace. This shaowed me where it was hanging .

nssbackup/managers/BackupManager.py", line 217, in isexcludedbyconf

and this line have a test of read access to the file we want to backup

   # refuse a file if we don't have read access

   try :

--> fd = os.open(_file2, os.R_OK)

    os.close(fd)

   except OSError, e:

    getLogger().warning(_("We don't have read access to '%(file)s', it has to be exclude : %(error)s ") % {'file':_file2, 'error':str(e) } )

    return True

I found the explaination here :

http://docs.python.org/lib/node546.html

Now I think I'll be able to fix your bug.

Changed in nssbackup:
importance: Undecided → Medium
status: Incomplete → Confirmed
Revision history for this message
Psykotik (linux-ikiru) wrote :

Great, happy to read that. But it was the same log than in my fourth message!

I'm crossing the fingers, now.

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

hello,
I have uploaded a version 0.1-5 to the PPA with your fix. Can you test it and tell me if the fix is working ?

Regards

Changed in nssbackup:
status: Confirmed → In Progress
Revision history for this message
Psykotik (linux-ikiru) wrote :

Thanks for your great support, Oumar!

Huge improvement, it seems to (sometimes) work. I've been able to backup all selected folders! But...

First time I launch, I get two identically logs, first saved into the folder in preferences, second strangely enough into the folder created for the backup (year-month-date-hour.user-desktop.ful). I attach one of them. The issue seems to be related to regex exclude syntax.

The second and fourth time, I remove part of regex expression, but nothing run; therefore I killed the python processes for the backup.

The fifth, which is the current, I put back the part removed of the regex; NSsbackup managed the backup with no error.

I have to investigate a bit more, to reproduce many times the backup process, add/remove the many options, and to check what exactly happens.

I noticed also there is many files which are not included into the backup, because of the permission settings. But... I run NSsbackup as root, and I do not understand why files with rwx permission for root are not included. Finally, would it be possible to save symbolic links? It would be nice if they could be included into the backup, but not followed (I mean they would be included as such, without the files linked to).

After some preliminary tests: running the backup in console mode (nssbackupd) works perfectly. But in graphical mode, it still stops.

Revision history for this message
Psykotik (linux-ikiru) wrote :

This is a log when the NSsbackup does its work (terminal).

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

Hello,

Looking at the working logs, I can see the ligne that was previously hanging :
2008-01-25 01:03:22,339 - WARNING - BackupManager.py:isexcludedbyconf(229) - Nous n'avons pas accès en lecture à '/home/psykotik/.mplayer/fifo'. Il doit être exclu : Couldn't open device!

This was the file that was preventing your backup to work.

The non working logs shows that you had an invalid REGEXP

Concerning the access rights, if you were talking about the time it worked, I think that you didn't launch it as root :
2008-01-25 01:02:25,638 - INFO - ConfigManager.py:__init__(252) - ConfigManager created with '/home/psykotik/.config/nssbackup/nssbackup.conf'

Root would have been /etc/nssbackup

For the logs, since version 0.1-3 (I think), we manage to put the logs, even in case of error in the snapshot directory (if this one has been created) so that we don't loose them. and we associate them to a backup.

Revision history for this message
Psykotik (linux-ikiru) wrote :

ok, I understand better; "gksu nautilus" was using /etc/nssbackup.conf, where "nssbackup" was using "~/.local/nssbackup/nssbackup.conf". Since my regex rules were only in /etc/nssbackup.conf, only "gksu nautilus" was prevented to run.

I'm going to run through new tests.

And... what about backup symbolic links?

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

well,

I don't usually do this on an official stable release. Adding what you ask about symbolic links is a new feature and I should have added this in the next series (0.2).
But I have added the feature in version 0.1-6, and uploaded it to the PPA.
To activate it, you'll need to manually add in your configuration file, under the "general" section, the option "backuplinks" set to 1 (see the example file in /usr/share/doc/nssbackup/examples )

Changed in nssbackup:
status: In Progress → Fix Committed
Revision history for this message
Psykotik (linux-ikiru) wrote :

Brilliant, it worked like a charm! NSbackup is a tool very complete which satisfy many of my needs; thanks a lot for your great support, Oumar.

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

I must admit that I have been motivated a lot by your great participation to this bug Report . You had a good reactivity and fast answers . It's been pleasant to work on this bug.

Best regards

Changed in nssbackup:
status: Fix Committed → Fix Released
Revision history for this message
spade (sammy-spade) wrote :

Hello,

I have the version 0.2-0~beta1 and it works well on full big partitions, but not on a small /home one
When I click on "Backup Now", the CPU is busy with the process "python" but never "gzip" nor "tar" appear in the top list. I can see the file /var/log/nssbackup.log
 growing up and up, and when it reaches 50kB, I edit it and kill the python process. The file is full of warnings like :
2008-06-13 18:22:26,164 - WARNING - BackupManager.py:isexcludedbyconf(229) - '/home/choupettem/.wine/dosdevices/f:/choupettem/.wine/dosdevices/f:/choupettem/.wine/dosdevices/f:/choupettem/.wine/dosdevices/f:/choupettem/.wine/dosdevices/f:/choupettem/.wine/dosdevices/f:/choupettem/.wine/dosdevices/f:/choupettem/.wine/dosdevices/f:/choupettem/.wine/dosdevices/f:/choupettem/.wine/dosdevices/f:/choupettem/.wine/dosdevices/f:/choupettem/.local/share/Trash/files/.mozilla/.mozilla/firefox/jp6n2dsm.default/lock' n'existe pas. Il doit être exclu
NSSBackup doesn't look to like infinite symbolic links, so I excluded "/home/choupettem/.wine" and added "backuplinks = 0" in "/etc/nssbackup.d/nssbackup-BackupHome.conf" (attached).

Not better !

Moreover, what is "mountdir = /mnt/nssbackup" ?

Regards.

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

Hello Spade,

In my opinion you should open a new Bug report for that. Not use this one which is closed by the way.
The "mountdir = /mnt/nssbackup" is the directory used to mount remote destinations when doing a backup or a restore.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.