Skip to content
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

Slow local dump restore #116

Open
evoxmusic opened this issue May 17, 2022 · 2 comments
Open

Slow local dump restore #116

evoxmusic opened this issue May 17, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@evoxmusic
Copy link
Contributor

I was making some tests, and using replibyte to restore in local is quite slow.

~/D/replibyte $ replibyte -c strapi-v4.yaml dump list
⠦
 name                 | size  | when        | compressed | encrypted
----------------------+-------+-------------+------------+-----------
 dump-1652739105408   | 11 kB | 8 hours ago | true       | false~/D/replibyte $ time replibyte -c strapi-v4.yaml dump restore local --image postgresql -v latest --port 8989
To connect to your PostgreSQL instance, use the following connection string:
> postgres://postgres:password@localhost:8989/postgres
Waiting for Ctrl-C to stop the container
^Ccontainer stopped!

________________________________________________________
Executed in   25.14 secs      fish           external
   usr time  348.08 millis    0.06 millis  348.02 millis
   sys time  191.67 millis    1.14 millis  190.53 millis

It takes ~25s to run replibyte -c strapi-v4.yaml dump restore local --image postgresql -v latest --port 8989 with a dump of 11kB.

If I run the command with -o it is far faster

~/D/replibyte $ time replibyte -c strapi-v4.yaml dump restore local -v latest -o > /dev/null

________________________________________________________
Executed in    1.78 secs      fish           external
   usr time  117.02 millis    0.08 millis  116.94 millis
   sys time   66.82 millis    2.61 millis   64.20 millis

It will be great to see how we can improve the docker starting time then :)

@evoxmusic evoxmusic added the enhancement New feature or request label May 17, 2022
@fabriceclementz
Copy link
Contributor

As an enhancement, we could start by fixing this workaround I’ve made while developing the first version of the restore local command

thread::sleep(Duration::from_millis(20_000));

A better approach is to poll the container status to wait until he’s up and running.

@evoxmusic
Copy link
Contributor Author

ahhhhh yes indeed 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants