Error while closing snapshot file over FTP (was: Incremental backups fail but not full backups)

Bug #632605 reported by Martin Schaaf
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
nssbackup
Won't Fix
Low
Unassigned
sbackup
Status tracked in Trunk
0.10
Invalid
Undecided
Unassigned
0.11
Fix Released
Low
Martin Schaaf
Trunk
Fix Released
Medium
Unassigned

Bug Description

In version 0.3.1 incremental backups no longer work and fail with the following exceptions.

010-09-07 20:17:16,718 - INFO in profile_handler.__collect_files(227): Inspect file system and collect file infos
2010-09-07 20:17:16,719 - DEBUG in pathparse.set_and_parse_uri(210): UriParser:
Display name: /root/.gvfs/FTP as backup to url.local/array1/backup
URI scheme: file
eff. scheme: file
Hostname: ``
Path: `/root/.gvfs/FTP als backup auf url.local/array1/backup`
Port: None
Username: `None`
Password: `None`
2010-09-07 20:17:16,950 - ERROR in nssbackupd.__notify_error(332): An error occurred during the backup:
Dataconnection closed
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/nssbackup/nssbackupd.py", line 280, in run
    self.__bprofilehdl.process()
  File "/usr/lib/python2.6/dist-packages/nssbackup/core/profile_handler.py", line 197, in process
    self.__collect_files()
  File "/usr/lib/python2.6/dist-packages/nssbackup/core/profile_handler.py", line 228, in __collect_files
    _collector = self.__create_collector_obj()
  File "/usr/lib/python2.6/dist-packages/nssbackup/core/profile_handler.py", line 266, in __create_collector_obj
    _collect.set_parent_snapshot(_basesnar)
  File "/usr/lib/python2.6/dist-packages/nssbackup/util/filecollect.py", line 274, in set_parent_snapshot
    self.__parent.set_base_snar(parent)
  File "/usr/lib/python2.6/dist-packages/nssbackup/util/filecollect.py", line 179, in set_base_snar
    self.__set_base_backup_time(basesnar.get_time_of_backup())
  File "/usr/lib/python2.6/dist-packages/nssbackup/ar_backend/tar.py", line 1102, in get_time_of_backup
    _header = self.getHeader()
  File "/usr/lib/python2.6/dist-packages/nssbackup/ar_backend/tar.py", line 1036, in getHeader
    fd.close()
Error: Dataconnection closed

I backup to a ftp server in private home network. But I can create 50GB full backup.

Related branches

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

Thanks for reporting this issue. Please upgrade to the latest version 0.11.1 of SBackup and test whether the problem persists.
Thank you and sorry for any inconvenience (there is really a need for beta testers in order to avoid such problems).

Revision history for this message
Martin Schaaf (mascha) wrote :

Yes, I have done this in between and there is the same problem for sbackup 0.11.1.

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

Hm, the error seems to be related to the FTP connection. It is not triggered inside of sbackup. I'll look into it, however I was not able to reproduce the bug so far (FTP access to Strato HiDrive works for me without flaws).

As a workaround you could use the 'legacy' Fuse plugins if they worked for you: https://answers.launchpad.net/nssbackup/+faq/1256

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

The procedure described here: https://answers.launchpad.net/nssbackup/+faq/1256 is also valid for sbackup 0.11.x

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

Of course, you'll have to install the package 'sbackup-plugins-fuse' then.

Revision history for this message
Martin Schaaf (mascha) wrote :

The fix is to handle the error (gio.Error) on closing the stream.
An exception on closing a stream for reading should not lead to a failing application. Even more if the error say that the connection is closed. So my suggestion is to catch the error and log but do not fail.
Here is some code that works for me:

import sys

...

try:
    fd.close()
except:
    LogFactory.getLogger().warn("error on closing the snarfile header after reading: " + sys.exc_info()[1])

With this fix I can now create incremental backups.

Martin Schaaf (mascha)
Changed in sbackup:
assignee: nobody → Martin Schaaf (mascha)
status: New → Fix Committed
Changed in sbackup:
status: Fix Committed → In Progress
Revision history for this message
Jean-Peer Lorenz (peer.loz) wrote :

Thanks for your fix. However, I've set the bug status to progress since the fix is not yet committed to trunk or 0.11 branch. I'll add the workaround to series 0.11. The question that remains is: why does this happen?

summary: - Incremental backups fail but not full backups
+ Error while closing snapshot file over FTP (was: Incremental backups
+ fail but not full backups)
Changed in nssbackup:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Martin Schaaf (mascha) wrote :

if my investigation is right then is this error with the message "data connection closed" thrown when the server closes the the connection.

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

Did this happen every time you've tried to make an incremental backup? What kind of FTP server are you running (is it NAS with FTP access, an old machine running a FTP server,...)? Are you able to reproduce the error? If so, I guess there is another thing that actually causes the FTP server to close the connection.

Revision history for this message
Martin Schaaf (mascha) wrote :

A Buffalo LinkStation Mini 2.5 1 TB with a ftp server. Yes, this happens everytime.

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

I've seen this error a few times on Maverick now. However, it did not happened every time. What distribution are you using?

Revision history for this message
Martin Schaaf (mascha) wrote :

Ubuntu 10.4

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

Users running nssbackup are encouraged to switch over to sbackup. This won't fix in nssbackup.

Changed in nssbackup:
status: Confirmed → Won't Fix
Revision history for this message
K8L (k8l) wrote :

Hi,

I get exactly the same problem with my server provider's backup FTP (online.net).

Full backup is OK, but incremental will fail.

I'm on ubuntu 10.4 Lucid Lynx

using 0.11.4

Error log tells :
SBackup 'Default Profile' Logger
==============
(...)
2012-03-07 11:12:41,694 - INFO: Perform tests at specified location
2012-03-07 11:12:42,047 - INFO: Checking for snapshots stored in old formats
2012-03-07 11:12:42,115 - INFO: Last full backup is 0 days old < 21 -> make inc backup
2012-03-07 11:12:42,234 - INFO: Snapshot '2012-03-07_11.12.42.115894.Balderdash.inc' is being made.
2012-03-07 11:12:42,235 - INFO: Setting Base to '2012-03-07_09.41.33.885286.Balderdash.ful'.
2012-03-07 11:12:42,236 - INFO: Setting packages File.
2012-03-07 11:12:42,425 - INFO: Setting Excludes File.
2012-03-07 11:12:42,426 - INFO: Setting compression format to `gzip`
2012-03-07 11:12:42,427 - INFO: Option 'Follow symbolic links' is disabled.
2012-03-07 11:12:42,427 - INFO: Inspect file system and collect file infos
2012-03-07 11:27:42,579 - WARNING: error on closing the snarfile header after reading: Host closed connection
2012-03-07 11:27:42,600 - ERROR: An error occurred during the backup: Operation unsupported
2012-03-07 11:27:43,757 - INFO: Terminating GIO File Access Manager.
2012-03-07 11:27:43,760 - INFO: Processing of profile failed with error: Operation unsupported

Using FUSE wont work (can't set ftp access when fuse is activated : errnum 5 I/O error

Is there a quickfix for this ?

Sincerely,

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.