6

What are /home/user/.cache/dconf and /home/user/.dbus? Why does their backup fail?

I tried following this 2013 answer (see code below) but while it allowed me to backup the above files, now I am told it couldn't backup /home/[user]/.dbus/session-bus.

deja-dup backup GUI reports inability to backup .dbus/session-bus

$ man chown
$ sudo chown user .cache/dconf
  [sudo] password for user: 
$ sudo chown user .dbus
$ man chgrp
$ sudo chgrp user .cache/dconf
$ sudo chgrp user .dbus

How do I fix it so it will not take my time closing an error message after each backup? Should I exclude these folders as eggonlegs suggested? Why are they not needed? Why would someone want to back them up?

DBinJP
  • 1,359
  • Cache files usually don't need to be backed up in any case. As for .dbus, what error are you getting? – muru Jan 30 '18 at 01:43
  • It only says it couldn't be backed up: There is no other error message. I have added ~/.cache to the 'Folders to ignore' setting, but why isn't it ignoring this cache folder by default, if cache files don't need to be backed up? – DBinJP Jan 30 '18 at 07:50
  • I am having the same problem. @muru The error is "Could not back up the following files. Please make sure you are able to open them." and then followed by the 2 files /home/[user]/.cache/dconf and /home/[user]/.dbus. .dbus and dconf have the following rights: drwx------ 3 root root 4096 jun 25 2017 .dbus Of course I could give everyone all rights, but is that the best solution? – ffonz Feb 09 '18 at 10:35
  • 1
    ~/.dbus does not need to be backed up. It can be safely excluded from any backup you make. It merely contains the UUID of the dbus session bus. The system will generate a new UUID if an existing is not found. This means that after a Restore From Backup, you may need to logout/login if you encounter dbus errors. – user535733 Mar 17 '21 at 14:45

2 Answers2

2

You can make two sets of backup.

Frequent backup of files

  • Frequent backup of files, which is not complete (you can make it even less complete, if you wish).

    This is the backup that you run now, maybe you will modify it.

    Some files are used by the operating system, and will be modified during the backup, which will make the backup inconsistent - The backup will not match itself and not the system right after the backup. (There are methods to avoid this, for example to use other file systems than Ubuntu's standard ext4.)

    But the important files, your personal files and system tweaks can be backed up in this frequent backup.

Complete backup of the whole drive

  • A complete backup of the whole drive, which is less frequent, maybe 4 times per year or before and after major modifications of the operating system.

    This backup should be run when booted from another drive, for example a USB pendrive or CD disk with Clonezilla live.

    You can make a Clonezilla image, which is a directory with several files, where the big files are compressed. The image is 'complete', it can be restored to a new drive with at least the same size as the original drive, and the image can be stored in an external drive or in another computer via the network (ssh).

sudodus
  • 46,324
  • 5
  • 88
  • 152
  • Is there a need for user to backup these files, i.e. /home/user/.dbus, /home/user/.gvfs, and /home/user/.cache/dconf? They are own by root and not owned by user. – Sun Bear Apr 03 '19 at 13:53
  • 1
    @SunBear, In my computer those files are owned by my regular userID (not root). Those files are part of a complete backup. But many people are happy with 'less than a complete backup', for example only the personal files (documents, pictures, video clips etc), or the own home directory (which will includes personal tweaks), maybe with the addition of some files from /etc, for example /etc/fstab, which are owned by root. Please notice that it is very quick and easy to make a fresh installation, and then copy back your personal files (and tweaks) from the backup. – sudodus Apr 03 '19 at 15:23
1

I had the same problem:

  • ~/.dbus was failing at being backed up, and
  • it was belonging to root:root

Thanks to this answer, I've deleted ~/.dbus, restarted, and run the Backup again.

The Backup is now fully working!

Note 1: the .dbus folder it's not been recreated yet, but it should be when needed (hopefully with the appropriate myuser:myuser permissions).

Note 2: the same fix applies to ~/.cache, but beware of doing it with ~/.gvfs, especially if there are network folders mounted!