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

Bug #632605 reported by Martin Schaaf on 2010-09-07
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Won't Fix
Status tracked in Trunk
Martin Schaaf

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/", line 280, in run
  File "/usr/lib/python2.6/dist-packages/nssbackup/core/", line 197, in process
  File "/usr/lib/python2.6/dist-packages/nssbackup/core/", line 228, in __collect_files
    _collector = self.__create_collector_obj()
  File "/usr/lib/python2.6/dist-packages/nssbackup/core/", line 266, in __create_collector_obj
  File "/usr/lib/python2.6/dist-packages/nssbackup/util/", line 274, in set_parent_snapshot
  File "/usr/lib/python2.6/dist-packages/nssbackup/util/", line 179, in set_base_snar
  File "/usr/lib/python2.6/dist-packages/nssbackup/ar_backend/", line 1102, in get_time_of_backup
    _header = self.getHeader()
  File "/usr/lib/python2.6/dist-packages/nssbackup/ar_backend/", line 1036, in getHeader
Error: Dataconnection closed

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

Related branches

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).

Martin Schaaf (mascha) wrote :

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

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:

Jean-Peer Lorenz (peer.loz) wrote :

The procedure described here: is also valid for sbackup 0.11.x

Jean-Peer Lorenz (peer.loz) wrote :

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

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


    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) on 2010-09-08
Changed in sbackup:
assignee: nobody → Martin Schaaf (mascha)
status: New → Fix Committed
Changed in sbackup:
status: Fix Committed → In Progress
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
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.

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.

Martin Schaaf (mascha) wrote :

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

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?

Martin Schaaf (mascha) wrote :

Ubuntu 10.4

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
K8L (k8l) wrote :


I get exactly the same problem with my server provider's backup FTP (

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 '' 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 ?


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

Other bug subscribers