You can do this perhaps?:
https://www.cyberciti.biz/faq/debian-ubuntu-linux-hook-a-script-command-to-apt-get-upgrade-command/
Put your command in a file under here:
/etc/apt/apt.conf.d/
You can also use rsync and copy any files you need to another location.
I backup OH like this:
I use bareos for my backups. Index of /current
I have several server I backup using bareos. Probably overkill for what you need?
Lots of options.