Can't restore from backup!


#1

I tried to make a backup from Packages>Selected my App>Check marked all the tables and include app files

The thing exported fine but when I tried to import my backup later it gave that error “App Import
JSON Error: Malformed UTF-8 characters, possibly incorrectly encoded”

I also tried to open the JSON file and it is is not in JSON.

Would really appreciate any help regarding that, it is absolutely critical to have backup and to be able to restore it safely.

Many thanks.


#2

Interesting…

So which file exactly are you looking at that isn’t valid json? When I export (locally) I get a dfpkg file that I can then directly import.

Here’s the kicker - if I have these services already in my DSP, then the app won’t load properly - you’ll have to export it without those services added, or simply remove that service upon importing.

I am not sure on the db schema, however, will have to get to test that tomorrow AM. Will reach back out then, appreciate your patience and let me know how that works.

Thanks,
Mark


#3

okay i tried to export again and import in my local machine but it seems that the database scheme is not part of the export.

How can i backup my database scheme and import it?


#4

Hey,

You’re wanting to export your entire db? Or do you want to just export the schema?

Have you tried going into phpmyadmin? located below:

localhost/phpmyadmin

Here you have access to entire DB… however, you must be careful when manipulating data including export and importing…

As far as exporting via the DSP, you could go to packages tab and simply select all of the schemas that way - though this will not include the data as you said.

Hope this helps.

Mark


#5

I am not using a localhost. I have an amazon instance running DF with a database and lots of data and I just want to have a backup of everything.

The database together with the data. How would I go around to do that?


#6

You will have to access phpmyadmin in order to get full data set. You’re not able to do localhost/phpmyadmin?

Thanks,
Mark


#7

nope I can’t access that on the server. I get that error “For security reasons, this URL is only accesible using localhost (127.0.0.1) as the hostname”

Shouldn’t DF just call mysqldump of MySQL? That already backup everything. Scheme and data. Basically everything I need. I don’t understand what is the point of that export feature if it just exports data without exporting the scheme or scheme only without data.

How do you guys personally backup your DreamFactory server?

I am still not 100% clear on what is the result of that export feature in DF. What is it intended for?


#8

The export feature that I am referring to is specifically pointed at phpmyadmin. In a hosted environment, such as in your scenario, it is a bit more difficult to get into this module that’s sitting on top of your LAMP stack and right there on top is the DreamFactory module.

So, if you look at my case - running locally on windows. I can easily go to launch phpmyadmin from the application manager (is there no option to launch phpmyadmin from there when using on AWS?) and export the entire dreamfactory database - which is essentially doing a mysql dump of the DF db as it contains the schema and data within your entire DSP.

The export feature within the packages tab is for individual apps to be exported.

Here is an example of how I recently used it:

I wanted to take an app named “myApp” from my hosted edition of my DSP and import it into my local version hosted on my wamp stack. So, I proceeded to go to this packages tab on my hosted edition - and from there - clicked the schema + service that was associated with the app and also “included the application’s files.”

Finally, I hit ‘export app’ - and a (.dfpkg) file was downloaded to my machine. I then imported this app successfully to my wamp version of DreamFactory.

Thanks man, hope this helps a bit

  • Mark

#9

I can’t get that scenario you mentioned. The scheme is called db on my local installation and on the server it is called schema. Somehow that is causing problems. Those are two screens from the server

and the localhost.

That’s the error I get when trying to import “
API Error
Failed to import application package.
Failed to launch service “schema”: Service not found” also the select storage service is disabled and I can’t select it even though the database service is in my services.

It is worth noting that i am running DF 1.7.6 on both localhost and amazon.

Cheers and many thanks for the extensive help.


#10

If i simply backed up my amazon ECS instance. That would work?


#11

Hey, which .json file are you referring to in this post? Thanks man.

Mark


#12

the export file is in dpkg.json and it should be just in dpkg. Anyway I will get back to that issue later. I will backup my entire amazon server for now.

I just want to get the caching issues fixed because I can’t ship with that insanely slow response time from the server. I have to install memcached. For more than a week now I can’t get any direct answers how to install it properly.


#13

Hey there’s a fix out on github for the export app issues, thanks for spotting that.
1.7.8 should have that in working order.

Sorry for the delay.


#14

We’re a bit off topic, but we put out a blog about moving over to nginx (memcached built in) .


#15

“You cannot change the web server on a DSP installed with a Bitnami package or running on our Free Hosted Edition. If you want to experience all the joy of the nginx, you’ll need to be running a self-installed server.”

That renders it useless for me.

The power of DreamFactory is that it is easy and fast. That’s what makes it an attractive solution for me as a developer. If it is not fast or easy to install then I am better off building the server using Ruby and Heroku. That will definitely take less time to setup than all that.


#16

Bitnami has an NGINX stack but DreamFactory isn’t yet packaged as a one-click NGINX install. I’m not sure yet when it will be available, we’re discussing with Bitnami.