Hi jpl
You wrote to another poster:
I appreciate your contribution as it is exactly what I am looking for. However I also find that it is not quite ready for use for backups to USB. ...
Hi Jim,
Thanks for your comments. I agree my job needs improvement for usb disk backup. Here are some further details.
When usb type backup is used, no mount or umount is made. Dar backup files are written on the directory specified in the server-manager panel.
So if you specify /media/usbdisk in your panel and you connect an usk disk whitout mounting it, backup is made on your server's local /media/usbdisk directory.
Present script cares about a real mount for smbfs, cifs, and nfs, but not for usb.
I think that the /mnt/smb directory is used for the temporary files
No. Even temporary files are on the backup system.
So, what could be done ?
We cannot trust about the fact that the usb mount point is named /media/usbdisk. It can be another name. The admin must know this name and specify it in the server-manager.
But I think the problem of the real mount can be solved by adding a test of /proc/mounts, to verify ther is a real mount (not only for usb) in the backup script.
About the possibilty to do the mount, I think we should take in account the two situations : admin keeps his usb disk always mounted, or admin wants the usb disk is mounted before each backup, and unmounted after each backup.
If we want to provide the two possibilities, we have two solutions :
- keep things unchanged and resquire the admin to add an action which mounts the usb disk in the pre-backup event, and unmount it in the post-backup event (it could permit to handle specific situations)
- let the admin specify his choice with an additional option in the usb backup setting panel, and modify the scripts consequently.
The second way needs a little modifications of the backup script.
Comments and opinions ?
N.B. I see no reason about the failure of the second backup. After the mount, script is the same for usb and other types of backup support.