I have "Backup" DejaDup app backing up my home folder to an encrypted external USB hard drive, but it takes hours. The GUI's "backup now" button is grayed out, indicating it's running, and Gnome says "starting scheduled backup". However, I have no idea how long it should take. Is there anyway to get progress info from DejaDup?

Top shows that the duplicity process is running with the option --log-fd=16. Duplicity's manpage indicates that this is the file descriptor of the log file it writes status updates to. However, if I run tail -f 16, I get the error tail: no files remaining. How do I read this log file descriptor?

  • There's a field you can click that says Details or More Info or something. It's not real helpful but you can see file names scrolling by, at least indicating that something is happening. This only seems to work when it says "scanning" or "backing up". – Organic Marble Nov 6 '16 at 19:09
  • @Organic Marble, It only shows that when I manually initiate the backup. If it automatically starts, then that page shows "error a backup is already in progress" and doesn't show any detail. – Cerin Nov 6 '16 at 19:13
  • @Cerin Ah. Thanks for the info. I only use manual backups so I didn't know that. – Organic Marble Nov 6 '16 at 19:57

I think you can monitor it like this:

using ps, get the PID and the log fd, e.g.

$ ps aux | grep duplicity
username  12345 97.2  4.9 878235 345123 ?       Rsl  02:21  15:02 python2 /usr/bin/duplicity --exclude=/run/media/..... --tempdir=/home/username/.cache/deja-dup/tmp --log-fd=18

The PID is 12345, and the file descriptor is 18.

Then go to /proc/PID/fd (/proc/12345/fd) and instead of trying to tail the file descriptor 18, use cat or grep.

$ cat 18

This shows way too much info for me. 90% of it are my exclude globs.

$ grep "examining path" 18

works well for seeing which file is being examined. If you look at the output, you can also focus on when it finds files match (and don't need backing up) or when they're different.


Based on the solution provided by @RichardSchwarting I created the following command that checks if the process is running an does the cat on /proc/x/fd/y:

pid=$(pgrep -n duplicity); if [ $pid ]; then fd=$( ps -o cmd --no-headers $pid | sed -E 's/.+(log-fd=[0-9]+).?/\1/' | cut -f2 -d =); if [ $fd ]; then cat /proc/$pid/fd/$fd; else echo "fd not found"; fi else echo "pid not found"; fi
  • This just gives me "pid not found". Note, duplicity doesn't seem to run. It's deja-dup that's running. – Cerin Jan 1 '18 at 15:49
  • @Cerin deja-dup is the UI, duplicity is doing the backup. The command only shows the log while the backup i.e. duplicity is running... – Clauds Jan 18 '18 at 15:13
  • Some of you probably have duplicity being run by python, in which case the executable is python, not duplicity. So instead, try using pid=$(pgrep -f duplicity); if [ $pid ]; then fd=$( ps -o cmd --no-headers $pid | sed -E 's/.+(log-fd=[0-9]+).?/\1/' | cut -f2 -d =); if [ $fd ]; then cat /proc/$pid/fd/$fd; else echo "fd not found"; fi else echo "pid not found"; fi – Thornkey Jun 7 at 1:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.