[Solved]Running Ubuntu 21.04. Easiest way to get Deja Dup to automatically create and save a backup job log file after every backup job?

I’m using the Deja Dup GUI. I’m mostly a Linux newbie beginner so if the answer involves lots of complicated command lines without context, I may not be able to follow (unless it’s fully step by step with no steps left out and with clear instructions).

I tried the DEBUG=1 option but could not determine if and where the log was saved.

If the best answer is “use xyz backup app instead” that’s fine. As long as the alternate backup app has a GUI and automatically creates a log of each backup job. And it can make incremental backups.

How did you use the DEBUG=1 option?

Deja Dup is a GUI for a program called Duplicity. Searching for information based on Duplicity might get better results.

From what I can see there are some logs stored in ~/.cache/deja-dup/. These logs show you directory information, the SHA1 hash and then the list of files included.

~ is short hand for /home/$USER

Another log is created in the backup folder itself called a “manifest”. It should be identical to the previous log file but it stays with the actual backup wherever that gets put.

1 Like

I was unable to find the webpage that gave the details. All I remember is it said run “deja_dup_DEBUG=1”. When I run the command it works but doesn’t give any info. Also the page didn’t say where the files are stored.

advait@advait-Bravo-15-A4DDR:~$ deja_dup_DEBUG=1
advait@advait-Bravo-15-A4DDR:~$

If you have any insights would be most appreciated.

I looked at these files. They’re “raw” logs without any kind of user-friendly summary. But the basic info is there so they’re of some use. Thanks.

In my next life as a skilled programmer I’ll update Deja Dup / Duplicity with user friendly informative log file summaries. :slight_smile:

The DEBUG option probably won’t be any more user friendly but it will be more informative to say the least. So here’s what you need to do. Keep in mind this will create very VERY verbose output.

In a terminal type:
DEJA_DUP_DEBUG=1
This will create a variable and set it’s value to 1. It is not an environment variable yet.

If you type:
echo $DEJA_DUP_DEBUG
It should output the value 1

Now type:
export DEJA_DUP_DEBUG
This takes your variable, which so far is only available to the current terminal, and makes it an environment variable so that it is persistent even if you close the terminal.

Type:
printenv DEJA_DUP_DEBUG
This will print the value of an environment variable if it exists. This should output the value 1. This just confirms that you’ve done all the steps so far correctly.

Run deja-dup from the terminal, but redirect the output to a file.
deja-dup >> /tmp/somefile.txt

By default, programs will print output to the terminal. If you want the output in a file, just redirect it with >> followed by the location and file name. Keep in mind >> will overwrite an existing file. If you want to add the output to an already existing file use a single >.

Now you won’t see any output in the terminal but you will have a text file when the backup is complete. This file will be many thousands, perhaps millions, of lines as it prints out literally everything it is doing.

NOTE: Don’t direct the output to a file that is in the path that deja-dup is backing up. I accidentally did this while testing this out lol.

1 Like

I followed the instructions but didn’t seem to work.

advait@advait-Bravo-15-A4DDR:~$ deja-dup >> /tmp/dejaduplog.txt
(org.gnome.DejaDup:28240): Gtk-WARNING **: 14:57:26.637: widget ‘GtkGrid’ isn’t suitable for mnemonic activation
^Cadvait@advait-Bravo-15-A4DDR:~$ deja-dup >> /tmp/dejaduplog.txt
^Cadvait@advait-Bravo-15-A4DDR:~$

I had to hit ctrl-c to end the process. No file was created called “dejaduplog.txt”.

Any ideas? Remember, I’m a newbie, so if steps were left out, then it wouldn’t work.

I’m looking more closely at the .manifest file created by Deja Dup when it runs. I think it has enough info to serve as a good summary of backup jobs. So I think that will resolve the issue. Could you mark this as resolved? Thanks again for your help on this. Especially thanks for letting me know about .cache/manifest file.