After reading Vivek Gite's article on passwordless SSH access for backup scripts, I modified his scripts

My scripts:

/etc/cron.daily/mustafejenbackup

/etc/cron.daily/konjakbackup

My scripts are hobby scripts aimed at home usage.
The idea with sourcing another users keychain files and using sudo is avoiding root login over SSH.
One caveat is that this other user may not have reading permissions for some files and directories.
For example, the user per cannot read /etc/sudoers.d/ which has to be copied manually doing this
way.

The lines with echo are because of MAILTO (when the backup has been done, cron mails me).

I am not sure whether this approach actually works, but this server is up on and off when I am not
sour, paranoid and feel like a drama queen.

When this server is up, it should be possible to download the scripts and ask somebody whether the
sudo approach enhances the sceurity or not.

ALERT!!

Before doing an rsync backup of a directory, think about whether you need to exclude a large
NFS/sshfs/(other type) file system mounted in this directory. I almost ended up doing an extra backup
of a 163 GB mp3 archive.