Pregunta

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

¿Fue útil?

Solución 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

Otros consejos

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top