4

My final goal is to have a full backup of the system (like time-machine) and use it to reinstall it in case of disaster. The intermediate goal is to backup all the working areas more times over the day.

Well, I followed all your suggestions: removed deja-dup installed Backups using apt-get didn't backup the root (not yet applied the suggested patches to incorporate /)

but the result is always the same. it looks as there is some corrupted data: Note the the final message is always the same!!!!

Traceback (innermost last):
  File "/usr/bin/duplicity", line 1555, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1541, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1393, in main
    do_backup(action)
  File "/usr/bin/duplicity", line 1511, in do_backup
    full_backup(col_stats)
  File "/usr/bin/duplicity", line 572, in full_backup
    globals.backend)
  File "/usr/bin/duplicity", line 454, in write_multivol
    (tdp, dest_filename, vol_num)))
  File "/usr/lib/python2.7/dist-packages/duplicity/asyncscheduler.py", line 146, in schedule_task
    return self.__run_synchronously(fn, params)
  File "/usr/lib/python2.7/dist-packages/duplicity/asyncscheduler.py", line 172, in __run_synchronously
    ret = fn(*params)
  File "/usr/bin/duplicity", line 453, in <lambda>
    vol_num: put(tdp, dest_filename, vol_num),
  File "/usr/bin/duplicity", line 342, in put
    backend.put(tdp, dest_filename)
  File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 395, in inner_retry
    % (n, e.__class__.__name__, util.uexc(e)))
  File "/usr/lib/python2.7/dist-packages/duplicity/util.py", line 79, in uexc
    return ufn(unicode(e).encode('utf-8'))
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 37: ordinal not in range(128)

The configuration is now:

Folder to save: /etc /dev /run /bi /sbin /snap /sys /proc /opt /media /root /lib64 /lib /srv /var /usr /mnt
Folders to ignore: Trash, /backup, /git, /neo4j, /sys_backup /home
Storage location: Local folder - /sys_backup
  • Why are you running a snap version of deja-dup when Backups (same thing) is included in 18.xx? Also, you wouldn't use deja-dup to backup /. – heynnema Mar 20 '19 at 17:28
  • Well, I uninstalled DejaDup and trried to search for Backup, but nothing happened. I did sudo apt-get install Backup put nothing was found.

    The only I found to install is 'command 'backup' from deb openafs-client

    So, the answer at your question is: I didn't find any Backup, and decided to install DejaDup.

    Any idea how to retrieve and install the original one?

    The only I found is command 'backup' from deb openafs-client

    – Paolo Di Pietro Mar 21 '19 at 09:02
  • Three versions of deja-dup can be found in the Ubuntu Software store... snap, flatpack, and traditional .deb. You might also try and reinstall duplicity. Backups was never designed to backup the system-level folders that you're backing up. See my answer for info about Timeshift. – heynnema Mar 26 '20 at 13:04

2 Answers2

6

Uninstall the snap version of deja-dup, and install the non-snap version. Use deja-dup to backup specific folders in your home directory (not all of / or ~/).

sudo snap remove deja-dup # remove the snap version
sudo apt-get update # update the software database
sudo apt-get install deja-dup # install deja-dup

Install timeshift and use it to backup system/OS files...

The closest thing to a Windows-like restore point is by using Timeshift. I use it to save snapshots to an external USB hard drive. Although it can, it's normally not used for backing up your /home directory, just system-level changes. Use Backups (Déjà Dup) for backing up /home files.

Timeshift is a system restore utility which takes snapshots
of the system at regular intervals. These snapshots can be restored
at a later date to undo system changes. Creates incremental snapshots
using rsync or BTRFS snapshots using BTRFS tools.

More information at https://github.com/teejee2008/timeshift

Add the PPA and install with:

sudo add-apt-repository -y ppa:teejee2008/ppa
sudo apt update
sudo apt install timeshift
heynnema
  • 70,711
  • I use the non-snap version of duplicity, and I get precisely the same error message :( – DYZ Mar 25 '20 at 20:28
  • @DYZ Three versions of deja-dup can be found in the Ubuntu Software store... snap, flatpack, and traditional .deb. You might also try and reinstall duplicity. Backups was never designed to backup the system-level folders that you're backing up. See my answer for info about Timeshift. – heynnema Mar 26 '20 at 13:05
  • I do not back up system-level folders, I backup my personal folders. You confused me with the OP. – DYZ Mar 26 '20 at 17:12
  • @DYZ Gett'in old ya know :-) Does reinstalling duplicity help at all? – heynnema Mar 26 '20 at 17:17
  • Not really, Now I am getting "Another duplicity instance is already running with this archive directory." – DYZ Mar 26 '20 at 17:19
  • In terminal, see dpkg -l *duplicity* | grep ii, and ps auxc | grep -i duplicity. – heynnema Mar 26 '20 at 17:53
  • No luck, getting the same original error about 'ascii' code. – DYZ Mar 27 '20 at 05:31
  • @DYZ Please start a new question. Provide as much detail as you can, including what you've tried to do to fix it. Please include snap list and dpkg -l *deja* | grep ii. Thanks. – heynnema Mar 27 '20 at 14:26
  • The advice to use the non-snap version (or non-flatpak, in my case) worked for me! After many hours of trying to get past timeouts, FileNotUploadedErrors, and Unable to find the server at www.googleapis.com with the flatpack version (v42.0), I tried the deb version (v40.7), and it worked. Thanks! I posted my experience here: https://askubuntu.com/questions/1259348/deja-dup-unable-to-find-the-server-at-www-googleapis-com-and-filenotuploaded/1259349 – joe Jul 15 '20 at 15:24
  • @joe Rather than starting a new question, with the same results, it would be better to just up vote this answer, as it solved your problem. – heynnema Jul 15 '20 at 15:31
  • @heynnema This isn't actually the same error/problem - I only found it by chance after looking through about a dozen different askubuntu/launchpad threads. My question/answer should be much easier for people to find, because we all run a Google for the error message as a first impulse when debugging. – joe Jul 15 '20 at 15:38
  • @joe It's the same solution. The problem is, we don't support Pop_OS at this site. See https://unix.stackexchange.com/ – heynnema Jul 15 '20 at 15:40
  • @heynnema, gotcha, although that's a different problem. I will get back to you (and update/move the post) on whether this is Pop-specific. – joe Jul 15 '20 at 15:44
  • @heynnema I just saw your "It's the same solution" edit. That's not a reason for not creating another question. Lots of very different questions have the same solution: "Question: How to fix ___? Solution: Restart your computer." The stack exchange sites are for helping people find answers to their questions. Policies around valid/useful content should be arranged around that core principle. I'm not interested in further debate here, in case you disagree (not trying to be unfriendly, it's just not a good use of my time). – joe Jul 15 '20 at 18:50
1

Dejadup works fine for root. You just have to do it right.

How do I open Deja Dup as root?

I suggest you separate your system and user backups.

It would probably be helpful if the application detected this pattern and advised the user of this alternative method.

ppetraki
  • 5,483
  • I didn't find sudo deja-dup-preferences

    Any idea how/where to find it?

    – Paolo Di Pietro Mar 22 '19 at 16:24
  • @PaoloDiPietro You can't find it because it's been removed. Great... Honestly, A backup that complex is better done using duplicity directly. Run it as root via a cron and make sure it preserves permissions/ownership. Example, https://wiki.archlinux.org/index.php/duplicity#Front-ends – ppetraki Mar 25 '19 at 13:00