Hi there,

On Mon, 21 Mar 2022, chiel wrote:

... a few directories are not included ...

One of these directories is "/var/lib/automysqlbackup". Which is created
after installing "automysqlbackup" which creates auto backup's mysql db's.

This folder has the following rights:

root@server-123:/var/lib/automysqlbackup# ls -allh
total 24K
drwxr-x---? 6 root root 4.0K Mar 20 12:59 .
...

Although it seems to me a little off the wall, I'll assume - for the
purpose of this thread - that you really *do* want BackupPC to back up
a bunch of backup files.  I would normally exclude such things - and
I'd also put them on a different box.

As you have it set up, the directory '/var/lib/automysqlbackup' is
only readable by user 'root' or by a user which is a member of the
group 'root'.  This means that, if a user which is *not* root and *not*
in the root group, unless the user knows the names of directories/files
under that directory and *additionally* has read access to them, that
user cannot read the directories/files contained within.

drwxr-xr-x? 3 root root 4.0K Mar 14 10:50 daily
drwxr-xr-x? 2 root root 4.0K Mar 14 10:50 monthly
drwxr-xr-x? 3 root root 4.0K Mar 14 10:50 weekly

The 'backuppc' user could read the contents of the directories daily,
monthly and weekly - but note that the directory content is things
like the names of the files contained in the directories, not the
content of the files themselves - to read the contents of the files
the files themselves (not their containing directories) must have the
appropriate permissions.  So for example if you explicity ask BackupPC
to back up

/var/lib/automysqlbackup/daily
/var/lib/automysqlbackup/monthly
/var/lib/automysqlbackup/weekly

by putting those paths in your configuration (assuming that the files
within those directories are readable by BackupPC) there would be no
problem for BackupPC to back them up.

When backuppc does a full backup it says that the backup has completed
successfully. However when I check this directory backuppc has created
the directory but says:

The directory /var/lib/aytomysqlbackup is empty

This message is possibly misleading.

On the client machine (Ubuntu 20.04.4) I used "sudo visudo" to edit the
/etc/sudoers file and added the following:

# Allow backuppc to run rsync as root
backuppc ALL=NOPASSWD: /usr/bin/rsync

Just because something is possible it doesn't necessarily mean that it
actually happens.  You would also need to get BackupPC to read the
directories and run rsync (or whatever transfer utility) as user root.
Perhaps you haven't done one or both of those things.

Furthermore I changed authorized_keys to add a couple of options to it:
no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa
XXXXXXXXXX backuppc@backup

Why?  Without some investigation I'm afraid that I have no idea what
effects, if any, this will have on your BackupPC setup.

So the questions is why is that particular directory not being backed up?

Very likely the directory permissions.  If you really need to back up
the backups, why not just give, to the automysqlbackup directory, read
permission for the backuppc user's group?

--

73,
Ged.


_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/

Reply via email to