Sync a Berkeley DB to an Asterisk Box
Overview
WANT: Get a berkeley db file ‘server1001.db’ from the server that creates the file across the cloud to an asterisk box.
CRUX: the source name is server$id1 while the destination is server$id2
HAVE: Tools such as
* sync_config() which is setup to sync these types of files using file_copy().
WHAT NEEDS TO BE DONE:
* Have sync_all() call sync_config() instead of sync_file when we have a .db file.
* Ensure destination file is in right place with right name.
Details
sync_config return
Relevance
What is the state of the sync_config return value? Currently sync_all (the caller) returns list of files it can not sync. It would be good to be consistent with this.
State of Affairs
- returns undef on path failure, syncd_client, and copy_file failure
However, we are not checking a return of syncd_client, just trapping fatal errors. This means we can’t be certain if a file transfers.
copy_file() does return something more useful perhaps.
PREGUNTA: What are the possible values for
return($resp->{value});
Little Cheap Houses Approach
- call sync_config() without checking return
- alternatively use sync_file instead of syncd_client.
- don’t prefix /etc/fonality when we have a .db file in sync_all.
TODOS?
- make sync_all LBS/Failover aware?
- pass in the param in slot 3? yay
Showing changes from previous revision. Removed | Added
