-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial log upload support #21
Comments
Outdated Proposal - See my next proposal below@peterbarker My current work adding this feature can be found here. I’m attempting to follow your proposal but have hit a bit of an issue with the cloudsync_dir. Basically the log is rsync’d from the dflogger directory and I can't find a good way to rsync it to a non-existent target directory without first making the directory on the server. For the time being I’m dumping the logs into the cloudsync_user’s home directory on the server. I’m using pre shared keys for authentication with the server. It’s quite simple for someone to replicate the server setup if they wanted to manage their own logs, but i'm assuming that the end goal is to have one server used by many users & vehicles. One idea is as follows (edit - added some details): One time registration with datalog server
One time setup on the companion computerThis can all be automated from a webform being served by the companion computer
Normal operationThe companion computer wants to rsync a log
Accessing the logs on the datalog serverWhen a user wants to retrieve logs they have sent to the datalog server
Making this somewhat secure would be a bit of a challenge, but we could chroot jail a user to the assigned folder for that particular one time upload? Just ideas, but let me know your thoughts. |
Current Proposal@davidbuzz mentioned some really good ideas with regards to making the process easier for users. I'll try and capture those ideas here, but in general:
One time registration with datalog server + setup of the companion computerSignificantly reduces the user setup effort user steps:
all steps:
Normal operationThe companion computer wants to rsync a log user steps:N/A all steps:
Accessing the logs on the datalog serverWhen a user wants to retrieve logs that have been rsync'd with the datalog server user steps via 'normal' access :
user steps via companion computer access :
all steps:
|
We need some preliminary, rudimentary log upload support. This will be superseded by something more intelligent later.
Currently the DataFlash logs are written to
~apsync/dflogger/dataflash
.We need to get those logs off the companion computer and onto a server somewhere (heretoforth known as "the cloud")
Proposal:
identity_file
to be used when trying to upload logsdataflash-${VEHICLE_UNIQUE_ID}-$(date '+%Y%m%d%H%M%S
)` (CLOUDSYNC_DIR)rsync -aHz $FILEPATH ${CLOUDSYNC_USER}@${CLOUDSYNC_ADDRESS}:$CLOUDSYNC_DIR
$HOME/dflogger/dataflash-archive/$CLOUDSYNC_DIR
directoryDoing the files individually has the advantage that we will avoid pushing the same file up multiple times into differently-timestamped directories should the rsync transfer be interrupted by e.g. the CC machine being rebooted. The lack of --partial on the receiver end should mean that we don't end up with partial logs on the server, at the expense of transferring the same data multiple times.
Note that simply running rsync directly on the $HOME/dflogger/dataflash directory will seldom succeed as a file is constantly being written in that directory.
The text was updated successfully, but these errors were encountered: