When restoring: "IOError: [Errno 7] Argument list too long"

Bug #881269 reported by shevos
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Duplicity
Expired
Undecided
Unassigned
Déjà Dup
Expired
Undecided
Unassigned
deja-dup (Ubuntu)
Expired
Undecided
Unassigned
duplicity (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

  File "/usr/bin/duplicity", line 1359, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1342, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1276, in main
    restore(col_stats)
  File "/usr/bin/duplicity", line 591, in restore
    restore_get_patched_rop_iter(col_stats)):
  File "/usr/lib/python2.7/dist-packages/duplicity/patchdir.py", line 523, in Write_ROPaths
    ITR( ropath.index, ropath )
  File "/usr/lib/python2.7/dist-packages/duplicity/lazy.py", line 335, in __call__
    last_branch.fast_process, args)
  File "/usr/lib/python2.7/dist-packages/duplicity/robust.py", line 37, in check_common_error
    return function(*args)
  File "/usr/lib/python2.7/dist-packages/duplicity/patchdir.py", line 576, in fast_process
    ropath.copy( self.base_path.new_index( index ) )
  File "/usr/lib/python2.7/dist-packages/duplicity/path.py", line 425, in copy
    other.writefileobj(self.open("rb"))
  File "/usr/lib/python2.7/dist-packages/duplicity/path.py", line 605, in writefileobj
    if fin.close() or fout.close():
IOError: [Errno 7] Argument list too long

Revision history for this message
shevos (shevos37) wrote :

if the problem not solved..can i reinstall ubuntu 11.10 to make my system as fresh as before??????

Revision history for this message
Michael Terry (mterry) wrote :

You mention "can't restore to original location." Can you restore to a specified folder instead of choosing the "Original location" option?

I'm not sure why this would happen. "Argument list too long" is an odd error to get when closing a file.

I have a drastic thing you could try:
1) sudo gedit /usr/lib/python2.7/dist-packages/duplicity/robust.py
2) Find the line that looks like:
              'EIO', 'ETXTBSY', 'ESRCH', 'EINVAL'])):
3) Edit it to look like:
              'EIO', 'ETXTBSY', 'ESRCH', 'EINVAL', 'E2BIG'])):
4) Try again and let me know how it worked.

Changed in deja-dup:
status: New → Incomplete
summary: - backup can't be restore to origenal location
+ When restoring: "IOError: [Errno 7] Argument list too long"
Revision history for this message
Michael Terry (mterry) wrote :

Ken, do you have any ideas what "Argument list too long" would mean in this context?

Revision history for this message
shevos (shevos37) wrote :

i don't understand that problem.or how to be solved..i tried (no.1) which you gave me( suo gedit /usr/lib.......etc.. and here what i got:# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright 2002 Ben Escoto <email address hidden>
# Copyright 2007 Kenneth Loafman <email address hidden>
#
# This file is part of duplicity.
#
# Duplicity is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# Duplicity is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with duplicity; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

import errno

tmp_file_index = 1

def check_common_error(error_handler, function, args = ()):
    """Apply function to args, if error, run error_handler on exception

    This only catches certain exceptions which seem innocent
    enough.

    """
    # todo: import here to avoid circular dependency issue
    from duplicity import path

    try:
        return function(*args)
    #except (EnvironmentError, SkipFileException, DSRPPermError,
    # RPathException, Rdiff.RdiffException,
    # librsync.librsyncError, C.UnknownFileTypeError), exc:
    # TracebackArchive.add()
    except (IOError, EnvironmentError, librsync.librsyncError, path.PathException), exc:
        if (not isinstance(exc, EnvironmentError) or
            ((exc[0] in errno.errorcode)
             and errno.errorcode[exc[0]] in
             ['EPERM', 'ENOENT', 'EACCES', 'EBUSY', 'EEXIST',
              'ENOTDIR', 'ENAMETOOLONG', 'EINTR', 'ENOTEMPTY',
              'EIO', 'ETXTBSY', 'ESRCH', 'EINVAL'])):
            #Log.exception()
            if error_handler:
                return error_handler(exc, *args)
        else:
            #Log.exception(1, 2)
            raise

def listpath(path):
    """Like path.listdir() but return [] if error, and sort results"""
    def error_handler(exc):
        log.Warn(_("Error listing directory %s") % path.name)
        return []
    dir_listing = check_common_error(error_handler, path.listdir)
    dir_listing.sort()
    return dir_listing

from duplicity import librsync
from duplicity import log

Revision history for this message
shevos (shevos37) wrote :

 i need this problem to be sloved pls.thanks in advance. wish you all the best

Changed in deja-dup (Ubuntu):
status: New → Incomplete
Revision history for this message
Michael Terry (mterry) wrote :

OK, try this:

1) Download this attachment (robust.py)
2) Open a Terminal (Ctrl+Alt+T)
3) sudo cp Downloads/robust.py /usr/share/pyshared/duplicity/robust.py
4) Try backing up again

Let me know how that works.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in duplicity (Ubuntu):
status: New → Confirmed
Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :

Could you run this one again with -v9 and attach the log to this bug report.

If the log is too long, attach just the first 200 lines and the last 200 lines. The middle part is normally not useful.

Vej (vej)
Changed in duplicity:
status: New → Incomplete
Changed in duplicity (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Déjà Dup because there has been no activity for 60 days.]

Changed in deja-dup:
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Duplicity because there has been no activity for 60 days.]

Changed in duplicity:
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for duplicity (Ubuntu) because there has been no activity for 60 days.]

Changed in duplicity (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for deja-dup (Ubuntu) because there has been no activity for 60 days.]

Changed in deja-dup (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

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