Domanda

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

È stato utile?

Soluzione 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

Altri suggerimenti

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top