In order to create cron jobs with the Backup script, this should be able to detect
- if the remote Backup server is available (ping)
- If it is possible to connect to it
- if it has the backup disk mounted (e.g. the
${DST_POOL} is available)
- if no pool is mounted, the script could do something like
zpool import and check if the desired pool is ready to be imported
zpool import <pool_name> to import the pool and then if everything is OK then continue the backup.
If any of these goes wrong, the script shall exit gracefully with a self-explanatory message in syslog.
Doing this, one could simply turn on the Backup Server and the Backup Disk if it is external, then go away: the system would set up by itself.
In order to create cron jobs with the Backup script, this should be able to detect
${DST_POOL}is available)zpool importand check if the desired pool is ready to be importedzpool import <pool_name>to import the pool and then if everything is OK then continue the backup.If any of these goes wrong, the script shall exit gracefully with a self-explanatory message in syslog.
Doing this, one could simply turn on the Backup Server and the Backup Disk if it is external, then go away: the system would set up by itself.