Deja Dup should not check for ~/.cache/deja-dup/metadata if ~/.cache is excluded

Bug #1263337 reported by Matthäus Brandl
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Déjà Dup
Confirmed
Undecided
Unassigned

Bug Description

For a long time (at least in Ubuntu 12.10) I'm receiving the error "~/.cache/deja-dup/metadata could not be restored" after every backup which is quite annoying. It seems that Deja Dup is looking for this file as kind of sanity check for this backup.
However I excluded the .cache directory. So DD will never ever find that file and warn me in all eternity. (I just included ~/.cache/deja-dup, let's see if that changes things)
(Why would you backup a cache dir anyway? see also http://askubuntu.com/questions/40992/what-files-and-directories-can-be-excluded-from-a-backup-of-the-home-directory)
If this really is a sanity check than you might look for a file which really is included. And please add a line to that dialog box telling the user the consequence of that error.

Backing up and restoring seems to work fine, I renamed a file in my home dir and could restore it using the context menu in Nautilus.

% LC_ALL=C lsb_release -d
Description: Ubuntu 13.10

% dpkg-query -W deja-dup duplicity
deja-dup 27.3.1-0ubuntu1
duplicity 0.6.21-0ubuntu4.1

Revision history for this message
Matthäus Brandl (matthaeus) wrote :
description: updated
description: updated
Revision history for this message
Matthäus Brandl (matthaeus) wrote :

I've tried to create the dump in English, but prepending the command with LC_ALL=C did not work. Please let me know how to achieve this and I'll gladly provide you with the requested file.

Revision history for this message
Matthäus Brandl (matthaeus) wrote :

Screen shot of the error message

Revision history for this message
Norbert Goebel (goebel) wrote :

Thanks for the bug report.
Almost 3 months later I start using deja-dup with ubuntu 14.04 and stumble upon the same problem.
~./cache excluded from backup
but deja-dup is using the never backupped file ~/.cache/deja-dup/metadata to verify the backup?!?

I am not sure if deja-dup really is the right software to handle my backups when seeing such behaviour.
And another feature I am missing - which is essential for backups - is a verify by hand. I want to be able to check the integrity of a backup, please.

Revision history for this message
Marko Hrastovec (marko-hrastovec) wrote :

I also tried to exclude .cache from backup because I really don't know why should I backup cache and I have some pretty large directories there (including ~/cache/deja-dup). However, I get an error message that backup had problems because .cache is excluded.

I also tried to exclude .cache and to include just ~/cache/deja-dup. It seems that exclude overrides include in this case.

Revision history for this message
Vej (vej) wrote :

Setting to "Confirmed" because this bug affects multiple users.

Changed in deja-dup:
status: New → Confirmed
Revision history for this message
Vej (vej) wrote :

Hello.

Here is an excerpt of the code, which shows, that the metadata should be always included during backup (no mater what choices you make for include and exclude):

    var settings = get_settings();
    var include_list = settings.get_file_list(INCLUDE_LIST_KEY); <- This comes from your settings
    var exclude_list = settings.get_file_list(EXCLUDE_LIST_KEY); <- This comes from your settings

    // Exclude directories no one wants to backup
    var always_excluded = get_always_excluded_dirs(); <- This are extra excludes
    foreach (string dir in always_excluded)
      job.excludes.prepend(File.new_for_path(dir));

    foreach (File s in exclude_list)
      job.excludes.prepend(s);
    foreach (File s in include_list)
      job.includes.prepend(s);

    // Insert deja-dup meta info directory <- Here comes the metadata
    string cachedir = Environment.get_user_cache_dir();
    try {
      metadir = File.new_for_path(Path.build_filename(cachedir, Config.PACKAGE, "metadata"));
      fill_metadir();
      job.includes.prepend(metadir);
    }
    catch (Error e) {
      warning("%s\n", e.message);
    }

Revision history for this message
Vej (vej) wrote :

I could not find a warning in the output posted by Matthäus Brändl when creating this post (although I understand the german of his deja-dup.log). One possible reason for this might be that the relevant code might be introduced after he created this bug so I will try to reproduce this bug with a more recent version of Dèjá Dup.

Best Regards

Vej

Revision history for this message
Michael Terry (mterry) wrote :

So deja-dup backs up and restores the .cache/deja-dup/metadata file as a canary-in-the-coal-mine. It adds that directory to the backup even if the rest of .cache is excluded. It uses this for internal verification of backups, which is when you were seeing this error.

I'd be willing to bet your ~/.cache directory is a symlink, yeah? In which case, this is a dup of fixed-in-master bug 1217959. I'll mark as a dup.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.