View Single Post
Old 03-27-2014, 05:24 AM   #2
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by Lucas Malor View Post
Since I got the database corrupted very much times, I decided to do this little auto-backup tool. It simply backups the db every 20 minutes, if it's not corrupted.

Currently the script has some limitations:[list=1][*] backup file is not in the flash partition, but in /var/bak/. This is the reason. I need a way to detected when the device is connected via USB
I think the following lines from /usr/local/Kobo/udev/usb might be helpful.
Code:
MODULE_LOADED=`lsmod | grep -c g_file_storage`

if [ $MODULE_LOADED -eq 0 ]; then
	exit
fi

Last edited by tshering; 03-27-2014 at 06:07 AM.
tshering is offline   Reply With Quote