0

I get this error when try to restore a backup:

Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1532, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1526, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1377, in main
    globals.lockfile.acquire(timeout=0)
  File "/usr/lib/python2.7/dist-packages/lockfile/linklockfile.py", line 21, in acquire
    raise LockFailed("failed to create %s" % self.unique_name)
LockFailed: failed to create /home/zoroaster/.cache/deja-dup/d33a3d20343d288863d8447c1af54f02/Avestan.4889-8464751143147245462

It's just a test backup that I do with this setting:

Folders to save:

/etc
/lib
/root
/srv
/var
/usr/local
/home/zoroaster

And folder to exclude:

/var/run
/var/cache
/var/tmp

And from home I exclude Downloads, Videos and a few others.

The storage location is an external usbdrive.

For run backup I use command line with sudo since I am doing backup also of other folder not only home.

However, for test I use GUI, so maybe problem is that I am not restoring using "root"?

In this case, how to test via terminal if backup is successfully and can be restored.

I can also delete the backup and make new one as this is just a test for backup most important data and system in case of need.

As suggested I have install python-lockfile and then there was a button in Restore to install something in deja dup app. After the installation, this is the issue:

Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1532, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1526, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1377, in main
    globals.lockfile.acquire(timeout=0)
  File "/usr/lib/python2.7/dist-packages/lockfile/linklockfile.py", line 21, in acquire
    raise LockFailed("failed to create %s" % self.unique_name)
LockFailed: failed to create /home/zoroaster/.cache/deja-dup/d33a3d20343d288863d8447c1af54f02/Avestan.7691-8464751143147245462

After doing new backup using GUI, appear now similar error when trying to make new backup:

Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1532, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1526, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1377, in main
    globals.lockfile.acquire(timeout=0)
  File "/usr/lib/python2.7/dist-packages/lockfile/linklockfile.py", line 21, in acquire
    raise LockFailed("failed to create %s" % self.unique_name)
LockFailed: failed to create /home/zoroaster/.cache/deja-dup/d33a3d20343d288863d8447c1af54f02/Avestan.9581-8464751143147245462

If I do backup on local disc then work fine. the error only appear when trying to backup on usbdrive.

$ ls -dl /home/zoroaster/.cache/deja-dup/d33a3d20343d288863d8447c1af54f02
drwxr-xr-x 2 root root 4096 Jun 11 12:02 /home/zoroaster/.cache/deja-dup/d33a3d20343d288863d8447c1af54f02

After fixing issue, this new happen starting new backup:

Permission denied when trying to create ‘/duplicity-full.20180611T112448Z.vol1.difftar.gpg’
12
  • Perhaps you version of python-lockfile is out of date. Try apt-get install python3-lockfile
    – Brian
    Jun 11, 2018 at 10:33
  • The error is about python2.7 whose lockfile package is python-lockfile, not python3-lockfile.
    – dessert
    Jun 11, 2018 at 10:49
  • @dessert should I remove the phyton3-lockfile just installed before install phyton-locfile?
    – Zoroaster
    Jun 11, 2018 at 10:51
  • Make sense.. I remove phyton3-lockfile and installed python-lockfile. After installation I have open backups app and I found instead of button "Restore", there was button "Install" with message "Something important to install".
    – Zoroaster
    Jun 11, 2018 at 10:55
  • Awesome.. backup restarted successfully.. I have to wait that finish, and then will try restore. Many thanks for your help. Maybe make a response to not use sudo via terminal for open deja dup GUI, and I will mark as correct.
    – Zoroaster
    Jun 11, 2018 at 11:24

1 Answer 1

1

GUI applications should never be started with sudo as you did because they’ll save files with wrong permissions and ownership then. This is explained in full here:

Why should users never use normal sudo to start graphical applications?

Your issue seems to be the cache directory mentioned in the error message. As it’s just a cache directory, you can safely remove it with

sudo rm -rf /home/zoroaster/.cache/deja-dup/d33a3d20343d288863d8447c1af54f02

and test the backup again.

1
  • Yes I confirm that this fixed issue. Something new appear, but I think is not in relation with this issue. Thanks
    – Zoroaster
    Jun 11, 2018 at 11:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .