-
Notifications
You must be signed in to change notification settings - Fork 62
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
Migrate data from Filesystem to Postgres #81
Comments
While attempting to run the tar command:
as per
Now deleting the
Temporarily stopping the node.js server in order to perform the archive.
Now running:
And it's taking forever ... ⏳ |
https://stackoverflow.com/questions/9427553/how-to-download-a-file-from-server-using-ssh
Actual: scp root@178.79.141.232:hits/logs.tar.gz ./logs.tar.gz |
Ecto refresher: https://geoffreylessel.com/2016/from-zero-to-ecto-in-10-minutes |
Processing large files: https://www.poeticoding.com/processing-large-csv-files-with-elixir-streams |
Roadblock: dwyl/learn-devops#55 |
https://serverfault.com/questions/264595/can-scp-copy-directories-recursively
heading to bed let's see if it works overnight. |
At present the Node.js MVP saves data to the instance filesystem because that was the simplest way of storing data without having to manage any database.
see: hits-nodejs/lib/db_filesystem.js#L26-L68
This worked well for MVP as it streams the contents of the file each time a request is made and counts the lines in the file as the
count
. Node.js shines at this becausefs.createReadStream
is non-blocking.Anyway, with the migration to phoenix, we need to:
Tasks
I estimate that this will take me
T4h
because I have to:(this is the number of people - GitHub usernames - using the hits badge)
localhost
.localhost
localhost
hits_dev
PostgreSQL onlocalhost
hits_dev
PostgreSQL onlocalhost
The text was updated successfully, but these errors were encountered: