Run parallel duplicity processes for the same target

Asked by Anas ASO

Hi,

I am trying to run multiple duplicity jobs on different sources but hitting the same target (file:///).
It's not working and it keeps giving me the following error :

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/local/lib/python2.7/dist-packages/lockfile/linklockfile.py", line 49, in acquire
    self.path)
AlreadyLocked: /root/.cache/duplicity/94df170b542b4e193a777e69fbc74c50/lockfile is already locked

Details about my environment :
duplicity 0.7.06
Linux localhost 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64
/usr/bin/python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2]

Question information

Language:
English Edit question
Status:
Solved
For:
Duplicity Edit question
Assignee:
No assignee Edit question
Solved by:
Anas ASO
Solved:
Last query:
Last reply:
Revision history for this message
edso (ed.so) said :
#1

On 09.02.2016 17:47, Anas ASO wrote:
> New question #284867 on Duplicity:
> https://answers.launchpad.net/duplicity/+question/284867
>
> Hi,
>
> I am trying to run multiple duplicity jobs on different sources but hitting the same target (file:///).
> It's not working and it keeps giving me the following error :
>
> 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/local/lib/python2.7/dist-packages/lockfile/linklockfile.py", line 49, in acquire
> self.path)
> AlreadyLocked: /root/.cache/duplicity/94df170b542b4e193a777e69fbc74c50/lockfile is already locked
>
> Details about my environment :
> duplicity 0.7.06
> Linux localhost 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64
> /usr/bin/python 2.7.6 (default, Jun 22 2015, 17:58:13)
> [GCC 4.8.2]
>

backing up parallel into the same target makes no sense. choose "different" targets like file:///folder1 and file:///folder2 etc. background is that duplicity volumes/files are always named after the same scheme, so having two different jobs backing up into the same folder (target) would result in a corrupt backup.

..ede/duply.net

Revision history for this message
Anas ASO (aso-anas) said :
#2

Yeah you're right.
I had it scripted, and the target directory should change for each duplicity job. But that wasn't the case.
So it was only a bug on my script.
Anyway, thanks for the hint ;-)