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

Restore more than just the config #177

Closed
ramphex opened this issue Apr 28, 2024 · 12 comments
Closed

Restore more than just the config #177

ramphex opened this issue Apr 28, 2024 · 12 comments

Comments

@ramphex
Copy link

ramphex commented Apr 28, 2024

On 2.0.0, on the Back Up page, I have options of Config, Config + Graphs, Full Backup. When I try to restore though, it asks me to select a file, assuming it'll only accept the config file. How do I go about restoring config + graphs or a full backup?

@wiedehopf
Copy link
Collaborator

You upload the zipfile, then check all the boxes?

@ramphex
Copy link
Author

ramphex commented Apr 28, 2024

Hmm. So on MacOS Safari downloads the backup as a folder (assuming it automatically extracts the zip into a folder). I just tried it on Chrome and it downloaded the backup as a .zip file.

If anyone else runs into this issue, go to Safari Settings and uncheck 'Open "safe" files after downloading' in the General section.

@wiedehopf
Copy link
Collaborator

awesomemotive/easy-digital-downloads#1814

One option would be to add a note like someone did in the thread above:

Note for Safari users: If clicking a download link saves a folder to your hard drive instead of a zip file, try Control-click or right-click and select "Download Linked File". Only zipped plugins are accepted in WordPress.

The image doesn't need the file to be named .zip
Thus another option would be to name it .backup for safari.

What a terrible automation.

@dirkhh
Copy link
Owner

dirkhh commented Apr 28, 2024

I never understood why someone would voluntarily use Safari. It's a terrible browser.
But yeah, let's just change the suffix of the file we return / expect to be .backup

@wiedehopf
Copy link
Collaborator

Is there an easy way to detect it's Safari and only then change the suffix?
The restore would just accept both suffixes.

@wiedehopf
Copy link
Collaborator

Of course safari is in the chrome user agent string ... yeah not sure browser detection is worthwhile.
Apparently the detection logic is: safari + chrome in the string -> chrome ... safari in the string but not chrome --> safari.

@dirkhh
Copy link
Owner

dirkhh commented Apr 28, 2024

Additionally, browsers and other user agents lie all the time.
And it seems broken to send different files names, depending on browser.
What's wrong with changing the name in general?

@wiedehopf
Copy link
Collaborator

Yeah let's just change it in general then.
I liked the recognizable zip filetype just for clarity what it is.
But not worth the pain.

Not sure if .backup is the right choice or if it matters at all.

@dirkhh
Copy link
Owner

dirkhh commented Apr 28, 2024

the number of file name extensions that really are just a zip file...
.jar .apk .xlsx etc etc

dirkhh added a commit that referenced this issue Apr 29, 2024
Apparently Safari tries to be clever when it downloads .zip files
and that breaks our backup. Great job, Apple.

Fixes: #177
Signed-off-by: Dirk Hohndel <[email protected]>
@wiedehopf
Copy link
Collaborator

@ramphex
Can you check that button again and see if it now just works out of the box with the current beta?

@ramphex
Copy link
Author

ramphex commented May 4, 2024

Updating to b13, once done I'll check

@ramphex
Copy link
Author

ramphex commented May 4, 2024

Looks good, config and config + graphs download as .backup singular file in Safari

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

No branches or pull requests

3 participants