Question

"Whenever an admin user logs out his home directory,it should be backed up to /backup directory."

Was it helpful?

Solution 2

Not sure if you can use cron, but you can try to add backup commands to .bash_logout file which is located in admin's home.

To start backup in separate process try to use at.

at now <<EOF
# your commands to backup
EOF

OTHER TIPS

Please put any code for backup you want to in file

$HOME/.bash_logout

Its located in every user's home directory. If its not there then you can create one. But it should be owned by the same user. Not by root.

Read more

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top