elementor / lokl-cli

Interactive script to launch and manage your Lokl sites
The Unlicense
66 stars 7 forks source link

Error with backup script #7

Open tjc4 opened 4 years ago

tjc4 commented 4 years ago

Using Lokl. Been great so far.

Just tried to backup sites for the first time and encountered an error.

To produce the error: I started Lokl, inputted m for manage, Lokl detected my sites and I entered the number of the chosen site, then entered t for backup.

Any idea as to how I can get the backup script to run?

https://www.loom.com/share/267a70dc8b4146469df5d66c555917af

leonstafford commented 4 years ago

Hi @tjc4 - thanks for trying it out - cool to hear of some usage!

Hmm, I haven't tried under MinGW before. I believe it's been used in an earlier version (without backup functionality) using Git bash or WSL.

It's trying to store the backup file that it generates inside the Lokl instance (Docker container) into your host OS (Windows in this case)'s /tmp/ directory.

From a quick search, there's a chance there isn't this /tmp dir within MinGW. You could try to manually add it with something like:

mkdir /tmp

And then re-run the Lokl backup. I don't have a Windows handy to test that right now, but please let me know how that goes.

leonstafford commented 4 years ago

Looking at your video again, it seems to fail to find the generated backup file within the container itself, as if it weren't generated...

What we can do to debug, is to run the parts of the Lokl/Go script manually within the container, let me dig out the bits.

If you start by using the SSH option within Lokl to connect to the container, then...

leonstafford commented 4 years ago

This is the code within the Lokl/Go script which starts the backup:

https://github.com/lokl-dev/go/blob/687527c331c9335f090547f17adaceba8ea48761/go.sh#L329

And this is the script that it runs within the container itself to generate the backup, which seems to be failing in our case:

https://github.com/lokl-dev/lokl/blob/master/scripts/backup_site.sh

If you're able to step through those and see where it fails, that would help, but I understand this isn't the easiest process!

tjc4 commented 4 years ago

@leonstafford thanks for the quick reply!

I tried creating a tmp folder but was told the folder already existed. image

I tried the take_site_backup at the "choose action to performn" screen. I couldn't tell if anything happened or it worked. How would I check? image

As far as stepping through things to see where it fails, I'm happy to try to help but would need a bit of hand holding.

Let me know if there's anything else you'd like me to try. Thanks!