Wont backup to d-link nas, mount problem

Bug #599870 reported by EricDHH
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nssbackup
Fix Released
Medium
Jean-Peer Lorenz

Bug Description

ubuntu 10.04, amd64, nssbackup 0.2.1 from ppa.

Cause of bugged sbackup i installed nssbackup to get further backups with my d-link dns323. This works well with sbackup to ubuntu 9.10. The config-gui produce this option file, the "test" button works well, the ftp-server logs "backup "PUT /mnt/HD_a2/backup/agamemnon/test"

[general]
splitsize = 0
target = ftp://backup:anfang@192.168.1.250/agamemnon
format = gzip
mountdir = /mnt/nssbackup
maxincrement = 7
purge = 30
followlinks = 0
lockfile = /var/lock/nssbackup.lock

Going to backup these happens.

2010-06-29 18:45:13,697 - ERROR: Ziel ist nicht beschreibbar: [Errno 5] Input/output error
2010-06-29 18:45:13,699 - ERROR: Während der Sicherung ist ein Fehler aufgetreten:
[Errno 5] Input/output error
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nssbackup/nssbackupd.py", line 218, in run
    self.__bm.makeBackup()
  File "/usr/lib/python2.6/dist-packages/nssbackup/managers/BackupManager.py", line 288, in makeBackup
    self.__checkTarget()
  File "/usr/lib/python2.6/dist-packages/nssbackup/managers/BackupManager.py", line 513, in __checkTarget
    raise e
IOError: [Errno 5] Input/output error

The error was displayed in the panel, the phyton process goes to zombie state. The d-link ftp shows no new logline, so nothings happen bout the network.

Installed packages:
ii nssbackup 0.2.1ppa1~luci Not So Simple Backup Suite
ii nssbackup-comm 0.2.1ppa1~luci NSsbackup Common files package
ii nssbackup-ftp 0.2.1ppa1~luci NSsbackup Fuse FTP/SFTP plugin
ii nssbackup-gtk 0.2.1ppa1~luci NSsbackup GTK+ GUI
ii nssbackup-ssh 0.2.1ppa1~luci NSsbackup Fuse SSH plugin

Revision history for this message
Jean-Peer Lorenz (peer.loz) wrote :

Thank you for taking the time reporting this bug.

In order to track down the problem please answer following questions:
* is `agamemnon` the root of your ftp server?
* do you've tried to create a folder with appropriate permissions there (before configuring the backup) using a ftp application?
* do you really have write permissions in the specified directory?
* did you started from commandline or using the GUI (make backup now button)?
* what panel do you mean where the error was displayed (as you said)?
* do you run the configuration above as user or superuser?

Can you do/try:
* post your full configuration file (remove personal data) as attachment here
* post your full log file here (also obfuscated)
* execute the backup application from commandline and post the output
* run with log level = debug (configurable in GUI)

Thanks for your help and sorry for your trouble.

Changed in nssbackup:
status: New → Incomplete
Revision history for this message
EricDHH (ericdhh) wrote :
Download full text (7.3 KiB)

Found the same bug on my laptop.

Agamemnon is the folder for the desktop, ftp root shows up the 3 folders. At login i get this ftp root from the d-link. When using nautilus for share i can open and delete folders and files. The nssbackup test creates a "test" file right in place, i looked with second computer in the folder.

eric@calliope:~$ ftp 192.168.1.250
Connected to 192.168.1.250.
220---------- Welcome to Pure-FTPd [TLS] ----------
220-You are user number 1 of 10 allowed.
220-Local time is now 12:20. Server port: 21.
220-This server supports FXP transfers
220 You will be disconnected after 5 minutes of inactivity.
Name (192.168.1.250:eric): backup
331 User backup OK. Password required
Password:
230 OK. Current restricted directory is /
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 PORT command successful
150 Connecting to port 34749
drwxr-x--- 20 backup 703 4096 Jun 30 12:13 agamemnon
drwxr-x--- 3 backup 703 4096 Jun 30 08:24 artemis
drwxrwxrwx 16 501 501 4096 Jun 30 12:14 calliope
226-Options: -l
226 3 matches total
ftp> cd agamemnon
250 OK. Current directory is /agamemnon
ftp> mkdir backuper
257 "backuper" : The directory was successfully created
ftp> rmdir backuper
250 The directory was successfully removed
ftp> exit
221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
221 Logout.

Permission is full when using the right user:password pair.

Tryed both, startet nssbackup-config-gui from terminal and from the gnome addons menu.

The feedback applet in the gnome-panel displays the nssbackup dialogues.

Configuration from menu asks forced for su priviledges, From terminal i testet "su nssbackup-config-gui" above and now with user only. Test works already well, but the backup failed.

2010-06-30 13:28:31,448 - INFO: Sicherungsvorgang wird gestartet.
2010-06-30 13:28:31,450 - INFO: Initialisierung des FUSE File Access Manager.
2010-06-30 13:28:31,628 - ERROR: Ziel ist nicht beschreibbar: [Errno 2] No such file or directory: '/home/eric/.local/share/nssbackup/mountdir/ftp_backup@192.168.1.250/calliope/test'
2010-06-30 13:28:31,631 - ERROR: Während der Sicherung ist ein Fehler aufgetreten:
[Errno 2] No such file or directory: '/home/eric/.local/share/nssbackup/mountdir/ftp_backup@192.168.1.250/calliope/test'
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nssbackup/nssbackupd.py", line 218, in run
    self.__bm.makeBackup()
  File "/usr/lib/python2.6/dist-packages/nssbackup/managers/BackupManager.py", line 288, in makeBackup
    self.__checkTarget()
  File "/usr/lib/python2.6/dist-packages/nssbackup/managers/BackupManager.py", line 513, in __checkTarget
    raise e
IOError: [Errno 2] No such file or directory: '/home/eric/.local/share/nssbackup/mountdir/ftp_backup@192.168.1.250/calliope/test'
2010-06-30 13:28:31,690 - WARNING: Keine Sicherung vorhanden um das Log zu kopieren.
2010-06-30 13:28:31,691 - INFO: Beendigung des FUSE File Access Manager.
2010-06-30 13:28:31,692 - WARNING: Couldn't unmount /home/eric/.local/share/nssbackup/mountdir/ftp_backup@192.168.1.250
2010-06-30 13:28:31,693 - INFO: Bearbeitung des Profils ist beendet.

Her...

Read more...

Revision history for this message
EricDHH (ericdhh) wrote :

Here the logfile in debug mode. I tried to see the /mnt mount but there is only the /mnt/nssbackup folder without mount. Is a mount / folder with asterix sign possible?

Revision history for this message
Jean-Peer Lorenz (peer.loz) wrote :

I still need more information (last log was not helpful). Please do the following:

* start your configuration GUI as *normal* user and configure a simple backup szenario using your ftp target (few files to backup are enough), don't forget to enable debug mode
* disable any additional profiles (if you have one) here
* save the configuration and close the configuration gui
* copy the logfile of that configuration session for later posting (usually under ~/.local/share/nssbackup/log)
* open a terminal and type `nssbackupd`
* copy the log of this backup session (should be the last one written) and post it

In your previous logs are several errors listed and they look some kind of messed up.
Thanks for your contribution.

Revision history for this message
EricDHH (ericdhh) wrote :

I create a new folder on ftp for clear results, test button from gui says okay. A small folder with less files are chosen for this test, but runs in same error within seconds. The ftp stays mounted after closed nssbackup-config-gui, cannot unmounted by user.

umount /home/eric/.local/share/nssbackup/mountdir/ftp_backup@192.168.1.250/
umount: fstab enthält /home/eric/.local/share/nssbackup/mountdir/ftp_backup@192.168.1.250 nicht (Nur root kann es aushängen)

Revision history for this message
Jean-Peer Lorenz (peer.loz) wrote :

Thanks for the log. You are hitting a really weird bug here. The error is different every time:

1) 'IOError: [Errno 5] Input/output error' in checkTarget
2) '[Errno 2] No such file or directory: '/home/eric/.local/share/nssbackup/mountdir/ftp_backup@192.168.1.250/calliope/test'' in checkTarget
3) IOError: [Errno 2] No such file or directory: '/home/eric/.local/share/nssbackup/mountdir/ftp_backup@192.168.1.250/testfolder/2010-06-30_21.26.17.536714.calliope.ful/format' in commitFormatfile

Obviously, things are working basically though the connection sometimes gets broken. The last log shows nssbackup is able to connect to the ftp server and successfully creates a file there (the check target thing). While comitting the first real snapshot content the connection gets lost. (I use it with Strato HiDrive and it works without a flaw for me).

Could you walk into the mount directory and look for the snapshot folder `testfolder/2010-06-30_21.26.17.536714.calliope.ful` there. Does it exists? Can you browse your ftp drive while it is still mounted (i.e. is a connection established)?

P.S.: You can manually unmount using `fusermount -u <mountpoint>`. Take care when removing the mount directory manually. If the drive is still mounted you could delete its content by doing so!

Revision history for this message
EricDHH (ericdhh) wrote :

This is weird, through local net causes trouble but over internet it do a good job, hmmmm

I can see the folder, but it is marked as corrupt. There are zerofiles in it, only touched but not transfered.

200 PORT command successful
150 Connecting to port 53828
drwxr-x--- 2 backup 703 4096 Jul 1 07:35 2010-06-30_21.26.17.536714.calliope.corrupt
226-Options: -l
226 2 matches total
ftp> cd 2010-06-30_21.26.17.536714.calliope.corrupt
250 OK. Current directory is /testfolder/2010-06-30_21.26.17.536714.calliope.corrupt
ftp> ls
200 PORT command successful
150 Connecting to port 59443
-rwxrwxrwx 1 backup 703 0 Jun 30 20:26 format
-rwxrwxrwx 1 backup 703 0 Jun 30 20:26 nssbackup.2010-06-30_21.26.15.434272.log
226-Options: -l
226 2 matches total

I can put files there with ordinary ftp client ans with nautilus mounts. But look at this, do we have a fuse or curl bug? Exactly the same behaviour, names with zero length are placed.

eric@calliope:~$ curlftpfs backup:anfang@192.168.1.250 ~/mnt/ftp
eric@calliope:~$ cp Desktop/gparted-live-0.5.2-9.iso /home/eric/mnt/ftp/
cp: reguläre Datei „/home/eric/mnt/ftp/gparted-live-0.5.2-9.iso“ kann nicht angelegt werden: No such file or directory
eric@calliope:~$ ls -la /home/eric/mnt/ftp/
insgesamt 20
drwxr-xr-x 1 root root 1024 1970-01-01 01:00 .
drwxr-xr-x 3 eric eric 4096 2010-07-01 09:15 ..
drwxr-x--- 20 root root 4096 2010-06-30 23:52 agamemnon
drwxr-x--- 3 root root 4096 2010-06-30 09:24 artemis
drwxrwxrwx 18 root root 4096 2010-06-30 20:55 calliope
-rwxrwxrwx 1 root root 0 2010-07-01 09:24 gparted-live-0.5.2-9.iso
drwxr-xr-x 3 root root 4096 2010-07-01 08:48 testfolder

It seems the mount method cause the problems. Who knows the difference between curl and the nautilus mount.

Revision history for this message
EricDHH (ericdhh) wrote :

Crawling for an open bug in curlftpfs shows this, sounds similar. I cannot test with lower package versions of curlftpfs, cause nssbackup depends on a very new one.

http://bugs.archlinux.org/task/14753

Revision history for this message
EricDHH (ericdhh) wrote :

Rollback curlftpfs to ver 0.9.1, this requires some lib downgrades to older versions. Then did a smaller backup for testing purposes on user mode. Works well at a glance, i tested the archive on the d-link and all files are included. The bug seems to be in curlftpfs 0.9.2 cause it lost some older methods of acces. Take a look at this,there is a link to the sourceforge changelog page.

http://www.backupcentral.com/phpBB2/two-way-mirrors-of-external-mailing-lists-3/bacula-25/bacula-and-curlftpfs-0-9-2-does-not-work-anymore-104250/

Hope this can be fixed?

Changed in nssbackup:
status: Incomplete → In Progress
importance: Undecided → Medium
assignee: nobody → Jean-Peer Lorenz (peer.loz)
Revision history for this message
EricDHH (ericdhh) wrote :

New informations, i have installed vsftpd on the d-link for testing purposes and more security. With curlftpfs 0.9.1 the backup runs fast and well. When using the curlftpfs 0.9.2 package the python nssbac process goes to zombie do_wait after the "archive created" response from the panel.
Yes there are ugly ftp servers but in this case curl or the method of access seems to be the bogus.

Revision history for this message
Jean-Peer Lorenz (peer.loz) wrote :

Good job and thanks for tracking down. If it's a bug within an external dependency it is 'Won't fix' for nssbackup. You could file a bug for curlftpfs.

The good news: currently I'm working on a GIO backend for nssbackup that should solve the problem. If you're able to connect through Nautilus it'll probably also work with nssbackup. I'm trying to get this out as soon as possible. Therefore setting the status of this one to Progress.

Thanks again for your help and sorry for any inconvenience (but thats Open source made by volunteers :-)

Revision history for this message
EricDHH (ericdhh) wrote :

Think about nssbackup-nfs and nssbackup-smb plugin. With embedded devices there is no good way to backup trough encryption, i tried ssh and it tooks hours by the 400kB/s troughput. Embedded nas will give ftp, smb, nfs to the users, should be simple to share and reliable fast. The curlftp bug seems to mess up several things, u1 stays broken, bacula, sbackup.... ugly....

Revision history for this message
Jean-Peer Lorenz (peer.loz) wrote :

Do you see the issues with version nssbackup 0.3.0?

Note: default setting is to use the GIO backend. If you want to use the Fuse plugins instead: install the according packages (nssbackup-plugin-ftp...) and modifiy a Gconf setting. Open Configuration editior->Applications->sbackup->global preferences->fs_backend. Set it to 'fuse'. The setting is per user, i.e. if you want root to use the fuse plugins start the configuration editor with 'gksu gconf-editor'.

Changed in nssbackup:
status: In Progress → Incomplete
Revision history for this message
EricDHH (ericdhh) wrote :

The i386 package does a well ftp backup with the d-link. But the amd64 won't mount with same settings, i have to investigate this. GIO is default on both machines.

NSSBackup 'Standardprofil' Logger

==============

2010-08-12 17:06:01,399 - ERROR: Error in mount callback function: Unable to mount target
2010-08-12 17:07:34,630 - ERROR: Error in mount callback function: Unable to mount target

Revision history for this message
EricDHH (ericdhh) wrote :

We can close this bug, nssbackup works well in i386. Did a clean backup with my netbook to the nas. I will file a new bug for the amd64 mount problem.

Revision history for this message
Jean-Peer Lorenz (peer.loz) wrote :

Here is a brief summary before closing this bug report:

curlftpfs 0.9.2 is buggy, with curlftpfs 0.9.1 the backup runs fast and well -> won't fix.
A workaround is available since nssbackup 0.3.0: use GIO/GVFS backend rather Fuse plugins.

I set the status of this bug to `Fix released`.

Changed in nssbackup:
status: Incomplete → Fix Released
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.