Our home computer has two user accounts on it, one admin (user A) and one standard user (user B). I'm trying to use Back In Time to create regular, separate backups of each user's home folders (with permissions intact) regardless of who is currently logged in.
IE, if the computer is on, then I want backintime to check for and back up any changes to every user's home folders.
EXAMPLES: IF user A is logged in and user B is logged out for an entire day, I still want Back In Time to run a daily check/backup (if anything has changed) of user B's home folder, and vice-versa: even if User A is logged out all day, I still want Back In Time to run a daily check/backup of that user's home folder.
(How) is it possible to achieve this result while retaining permissions/ownership of the files and directories?
My rationale: Even though a user's home folder doesn't technically change unless or until that user actually logs in, I want to regularly check for and back up any changes regardless of whether the account is currently active because the user may have made changes and logged out before a new backup can complete.
What I've already tried: I set up two backup profiles from User A's (administrative) account, one for User A and one for User B, but they both went to User A's crontab, which I believe is only active when that User's account is active, correct? So if User B is logged in, backups won't run. Further, User B's backup is now owned by User A.
Option? Or would I set up backup profiles under each user's individual account that point toward the same backup locations? So if User A is logged in, a job to back up User B still occurs at least once, and if User B is logged in, a job to back up User A still occurs at least once. But I would be concerned it could create problems with ownership and permissions.
Option Example
User A backup profiles:
- User A backup runs hourly to /backup/location/UserA/
- User B backup runs on bootup/restart to /backup/location/UserB/.
User B backup profiles:
- User B backup runs hourly to /backup/location/UserB/
- User A backup runs on bootup/restart to /backup/location/UserA/.
Is the answer to making this work in configuring ACLs? That seems to be something my searches on this topic are pointing me toward...
Or setting up crontabs as different users? https://vnexplorer.net/set-up-automatic-mode-in-linux-with-crontab-s383585.html
Similarly, it is possible to schedule jobs in cron with the role of another user, using the -u flag :
sudo crontab -u username -e