1

Ubuntu Version: 22.04.1 LTS

Deja-Dup version 42.9

I use Timeshift to back up my Ubuntu system.

This excludes folders:

/root, /home/myadminname and /home/myusername from the system backup.

The contents of these are mostly data files plus some "dot" folders relating to application configs for my user account, e.g. .ssh for SSH transfers for the user in question.

Naturally, I could include these in the Timeshift backup and that would save these files also in the event of a crash with a drive. But that would mean lost or old versions of data files, emails, etc after a restore.

So I am trying to separate the two concerns and use deja-dup for the three folders listed above using a separate drives (or partitions within a large common drive) for the system and data backups.

I formatted the backup drive with GParted, made a gpt partition table and ext4 partitions.

I configure deja-dup to do a backup of the three folders and run it. But it immediately produces an error:

Error creating directory /media/sandbar/Inspiron-databak/inspiron-5567: Permission denied

This seems a sort of file permissions type error. I realize that /root and /home/myadminname are strictly speaking outside the access of the myusername account from which I run deja-dup. The folder alluded to in the error output is a root permissioned folder. But surely I'd have thought that any application doing backups would already have (or at least ask for) root privileges if that is the problem . . .

Is it something else ?

Or do I need a better backup app than deja-dup ?

EDIT

I tried to do as suggested.

On my admin account I get this error when doing a backup of just /home/myadminname folder:

Traceback (innermost last):
  File "/usr/bin/duplicity", line 92, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 75, in with_tempdir
    fn()
  File "/usr/lib/python3/dist-packages/duplicity/dup_main.py", line 1555, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/lib/python3/dist-packages/duplicity/commandline.py", line 1223, in ProcessCommandLine
    config.backend = backend.get_backend(args[0])
  File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 209, in get_backend_object
    return factory(pu)
  File "/usr/lib/python3/dist-packages/duplicity/backends/giobackend.py", line 96, in __init__
    self.remote_file.make_directory_with_parents(None)
 gi.repository.GLib.GError: g-io-error-quark: Error creating directory /media/sandbar/Inspiron-databak/inspiron-5567: Permission denied (14)

This suggests errors in deja-dup modules.

Besides this I don't think daily backups is adequate. yet all I see is a choice of Daily or Weekly backups in the config drop-down list. This is unlike the many YouTube tutorials in which Hourly backups is offered.

I also observe that since July 2022 various failure bugs are reported for deja-dup . . .

Is there any more reliable and user-friendly alternative out there, anyone ?

Trunk
  • 318
  • If this makes sense, I can expand these ideas into a full answer. – user68186 Nov 05 '22 at 01:42
  • I see. So I go to each user and create a backup process for each. Thanks for clarification. – Trunk Nov 05 '22 at 12:26
  • I have converted my comments to an answer. Feel free to accept it as correct. – user68186 Nov 05 '22 at 13:02
  • @user68186 Not working that way either. Refer to OP edit above. I doubt if this is a small thing. – Trunk Nov 05 '22 at 17:24
  • I have been using Deja-dup for the six years. I never had the problem in your edits. – user68186 Nov 05 '22 at 17:32
  • I think it may be affected by my not having set suitable owner, group and permissions for the backup directory. (Although no such hassle was encountered by timeshift backups since sudo permission was asked for.) I will try it later. If it fails it's maybe time for back In Time - I believe BIT works in same way to Timeshift, i.e. one snapshot and then simply details of file changes at each scheduled backup.Thank you for your help. – Trunk Nov 05 '22 at 22:14

1 Answers1

2

Deja-dup is intended to be run at user level.

That is, if my computer has 3 users, Mr., Mrs., and, Miss., they have to set up deja-dup on their own. Mrs. can't do the backup for Miss. and Mr. can't do the backup for Mrs.

Backup Target

Each user must have full write, read, delete access to their respective backup target location.

For example, if Mr. wants to backup to an external USB drive, Mr. must be able to copy files into that drive. If Mr. does not have write permission to that drive, he can't use it as his backup target.

The same logic applies to remote backup locations. Whether it is a NAS or a cloud storage, the user must be able to write to and read from it to make backups there.

Different user, different schedule

Each user can configure backups to their own needs. Mr. can schedule backups every Sunday. Mrs. can schedule backups every day.

Backups are started when each user logs in. If Mrs. does not login for 3 months, no backups will be made of /home/mrs for 3 months. But then nothing new should be written in the folder /home/mrs so there should be no need for new backups if Mrs. does not log in.

Backup root

Since root login is not enabled in Ubuntu by default, Deja-dup does not back up the /root folder. The folder /root should not have any data.

The /root has some folders and configuration file created as and when various commands with the sudo prefix are used. These are usually defaults that do not need breaking up.

If you have some special files under /root that changes regularly, you can use timeshift to Breck them up. Alternately, if root login is enabled, you may set up Deja-dup for the user root after logging in as root.

Back-in-Time

Backintime is another backup app. When installed, it creates two launcher icons, one for the user and one to be used as root. You can open Backintime as "root" if you have admin preveledges. This will allow you to backup "everything".

See Comparison of backup tools for many other backup options.

Hope this helps

user68186
  • 33,360
  • root is not a user in the usual sense in Ubuntu. But it does have underlying superuser status. I have quite a few folders and dot-folders in my /root folder. I don't think Timeshift would be the right way to back these up. – Trunk Nov 05 '22 at 17:30
  • @Trunk indeed these folders and files in /root are the default configurations needed for the various commands used with sudo. I don't back them up. – user68186 Nov 05 '22 at 17:40
  • What I've got in my /root folder is: .launchpadlib .rediscli_history .lesshst .rpmdb .bash_history .local .selected_editor .bashrc main.conf snap .cache mysql-apt-config_0.8.15-1_all.deb .ssh .config .mysql_history .sudo_as_admin_successful .cups .npm .synaptic .dbus .profile .wget-hsts Now some of these like snap are important as some major apps are installed via this package manager. – Trunk Nov 05 '22 at 21:07
  • 1
    Installed Back In Time and applied the root backup to store /root and /home directories. Working fine for a week now. – Trunk Nov 14 '22 at 17:50
  • @Trunk thanks for letting me know that you got everything working to your satisfaction. Cheers! – user68186 Nov 14 '22 at 20:46