9

Using Ubuntu 16.04, deja-dup 34.2, and duplicity 0.7.06.

To start a weekly backup I connected the usual external drive with the usual computer, gave the password and received the halt message:

The existing backup is of a computer named correctname, but the current computer name is correctname.lan. If this is unexpected, you should back up to a different location.

Cancel/Continue

This is unexpected. Not because I plugged the external drive into the wrong computer, but because the name of the computer is indeed correct. Checked with uname -n.

I am not quite inclined to back up in a different location, because I would not want to have this issue happen again with other names/computers. Fresh backups are time-consuming, among other considerations.

The questions arise: how comes that deja-dup/duplicity is making up this name? how to fix this?

Added. By clicking on Continue you do perform an incremental backup. Still the halt message is an unnecessary stop in the procedure to avoid if possible.

1 Answer 1

7

Using Ubuntu 19.10, deja-dup 40.1, duplicity 0.8.04.

The questions arise: how comes that deja-dup/duplicity is making up this name?

According to bug reports (ranging as far back as 2010), it's a bug in affecting . Duplicity prefers the fully-qualified domain name (FQDN) for the backup's computer name.

  • The way the FQDN lookup is performed is affected by both your computer's network configuration, and the way the network the computer is connected to behaves.
  • In particular, external network changes can therefore break backups.1 This includes moving the computer from one network to another.

See

how to fix this?

The bug reports hints at editing /etc/hosts in various ways. Here's what I changed, with mycomputer being my chosen name. Note that order seems to matter.

/etc/hosts (ipv6 addresses omitted)

Original:

127.0.0.1   localhost
127.0.1.1   mycomputer

Modified:

127.0.0.1   mycomputer localhost
127.0.1.1   mycomputer

As soon as I saved the file, an automatic backup started. It worked as expected.2,3

See


1 My backups broke around the time when my ISP upgraded their infrastructure in my area to . Started seeing "hostnamed changed" with hostnames such as dynamic-xxxx-yyyy-zzzz.area-123.example.com.

2 Tried to verify by reverting the file and rebooting, but backup still works so unsure if it actually fixes the problem, or just triggers deja-dup/duplicity "the right way". Might be related to DHCP timeouts (7 days) in the ISP-owned router, or some other setting I changed. Am posting the answer anyways, but might have to revise if it stops working in a week.3

3 It has now been more than one week since writing this answer.2 Both starting a backup and verifying backups succeeded. Also rebooted and started another backup, which also succeeded. It seems the suggested fix works so far, at least for myself on my machine and in my network environment.

4
  • Thanks for the good work. Following the suggested edit to /etc/hosts the backup interface has not come with the non-matching-name message any longer. I cannot recall the trigger that disrupted the procedure back then; probably a distribution upgrade? I will monitor the outcomes of this intervention in the next few weeks and see whether the fix is stable and has no side effects under normal usage. Apr 16, 2020 at 10:47
  • In time order. First result: issue solved. Second, issue appears again when making backup of a different user on the same computer. Third, after a backup without problems, issue appears again when making backup of the first user. I will post updates as I get more evidence. Apr 18, 2020 at 19:01
  • @XavierStuvw: ran backups today to confirm, which worked as expected -- and hopefully will continue to do so. I only have one user on this computer, so am not seeing multi-user issues. If the suggested fix indeed "triggers something" in deja-dup, perhaps it's user-specific. Worst case, it's affecting both user and system settings. Hope the situation stabilizes!
    – Joel Purra
    Apr 25, 2020 at 11:57
  • Works like heaven on Ubuntu 20.04 for a first backup. Will keep reporting... Nov 3, 2022 at 13:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .