← Back to team overview

duplicity-team team mailing list archive

Re: [Question #109951]: Errors don't go to logfile

 

Question #109951 on Duplicity changed:
https://answers.launchpad.net/duplicity/+question/109951

Kenneth Loafman proposed the following answer:
This is normal Unix behavior since you only redirected stdout, not
stderr.  To redirect both, use:
  duplicity options src tgt 2>&1 >> logfile
which will redirect both stdout and stderr to the logfile

...Ken

Rodrigo Alvarez wrote:
> Question #109951 on Duplicity changed:
> https://answers.launchpad.net/duplicity/+question/109951
> 
> Description changed to:
> I'm running duplicity from a script (triggered by a cronjob) and piping
> the output to a log file:
> 
> duplicity my_options source target >> logfile
> 
> BTW I'm using -v5 as logging verbosity.
> 
> When duplicity finds and error and crashes, my logfile has no
> information about the crash, however if I manually trigger the exact
> same script from the terminal, upon crashing duplicity does return a lot
> of stuff.  See the example below.
> 
> Not logging these errors to file makes the whole point of logging
> pointless for debugging.
> 
> Is there anything I can do to route these error messages to my log file?
> Is this a bug?
> 
> 
> -- begin example ---
> Traceback (most recent call last):
>   File "/usr/bin/duplicity", line 1236, in <module>
>     with_tempdir(main)
>   File "/usr/bin/duplicity", line 1229, in with_tempdir
>     fn()
>   File "/usr/bin/duplicity", line 1118, in main
>     action = commandline.ProcessCommandLine(sys.argv[1:])
>   File "/usr/lib/python2.6/dist-packages/duplicity/commandline.py", line 865, in ProcessCommandLine
>     backup, local_pathname = set_backend(args[0], args[1])
>   File "/usr/lib/python2.6/dist-packages/duplicity/commandline.py", line 760, in set_backend
>     globals.backend = backend.get_backend(bend)
>   File "/usr/lib/python2.6/dist-packages/duplicity/backend.py", line 153, in get_backend
>     return _backends[pu.scheme](pu)
>   File "/usr/lib/python2.6/dist-packages/duplicity/backends/localbackend.py", line 42, in __init__
>     self.remote_pathdir = path.Path(parsed_url.path[2:])
>   File "/usr/lib/python2.6/dist-packages/duplicity/path.py", line 470, in __init__
>     self.setdata()
>   File "/usr/lib/python2.6/dist-packages/duplicity/path.py", line 475, in setdata
>     self.stat = os.lstat(self.name)
> OSError: [Errno 112] Host is down: '/media/Backup_server/raid_bkup/Home'
> 
> --- end example ---
> 
> You received this question notification because you are a member of
> duplicity-team, which is an answer contact for Duplicity.
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~duplicity-team
> Post to     : duplicity-team@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~duplicity-team
> More help   : https://help.launchpad.net/ListHelp
>

You received this question notification because you are a member of
duplicity-team, which is an answer contact for Duplicity.