Closed quovadimus closed 6 years ago
This feature has been implemented in the develop
branch.
Looking for testing before merging to master
. I've published develop branch docs where the new endpoint is detailed:
https://patchserver.readthedocs.io/en/develop/apis/ps_api.html#post--api-v1-restore
An example curl
command to POST your backup archive to a new server is:
curl -X POST -F "file=@patch_archive.zip;type=application/zip" http://localhost:5000/api/v1/restore
I can test tomorrow. Have an empty dataset at the moment.
On Jul 18, 2018, at 6:46 PM, Bryson Tyrrell notifications@github.com wrote:
This feature has been implemented in the develop branch.
Looking for testing before merging to master. I've published develop branch docs where the new endpoint is detailed:
https://patchserver.readthedocs.io/en/develop/apis/ps_api.html#post--api-v1-restore
An example curl command to POST your backup archive to a new server is:
curl -X POST -F "file=@patch_archive.zip;type=application/zip" http://localhost:5000/api/v1/restore — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Tested successfully from Dev branch. Thanks.
Merged.
I keep getting server error 500 when attempting to POST as in the example above.
This is a fresh install from a new git clone today.
I'm still not sure what I'm missing or how to troubleshoot this. I followed the documentation and the example curl command but am unable to restore my backup.
@krispayne Are you using your own zip file or the archive generated by Patch Server using the backup feature?
@brysontyrrell I had a directory of JSON files named patch_archive that I zipped using Finder and also zip
on the command line.
It's been so long since I made the archive from Patch Server, I'm wondering now if safari did the fun trick where it downloads a zip and unarchives it for you and deletes the zip.
@krispayne The archive the server creates is a zipped patch_archive
directory that contains the JSON files. I didn't write the restore to be generic and accept any kind of zip file structure. It's specific to an archive like this.
ah bummer.
OK, I guess I'll just define my patches again.
@brysontyrrell per our Slack:
My zip file was an archive containing a directory of JSON files, not an archive of JSON files.
creating the zip per your recommendation zip patch_archive.zip patch_archive/*.json
worked flawlessly!
There is a need for a method of adding patch definitions from your backup to a new server.