Move folders and tables with questions on my new Drupal 7 site

Hello! How can I move manually hundreds of question from one my site to another?

I would like to find some folders and database tables (if needed) and just copy paste them to new prepared site and database.

The site is on Drupal 7, I also have some structure of Drupal (like terms and books for each questuion) wich I want to move.

But I also can use some export import operetaions if it is the easier way.

otacke's picture

Hi ksen-pol!

On Drupal 7, all your H5P files should be located inside the /drupal/sites/default/files/h5p/exports directory. Uploading those to a different site via the Editor is probably the best way to ensure data integrity.

Best

Thank you. It works but I have some problems.

If I do it not with the editor what folders and tables of database should I copy?

 

I have 400 files in the export folder. I need to copy 300 of them. It takes a lot of time to paste it with the editor. And the second problem is that the names of the files don’t show the name of the node (the consist just of the numbers) and there are also files of different versions of the same node (maybe cause of editing or renaming, I am not sure). After I paste I have some versions of the same node and it takes a lot of time to figure out which one is new one.

How can I fix it?

 

Or is there any other way?

 

Can I paste multiple node?

 

 

Or can I export just the newest version with node name as the file name?

 

I also tryed to download fexport files manually from the node in the browser with the "reuse" button. But it is not working (screenshoot) 

screenshot

If it is not possible may be I can update exported files to have just new versions?

otacke's picture

Hi ksen-pol!

The result that you receive when downloading content manually is caused by your server not knowing H5P as a MIME type, cmp. https://h5p.org/comment/19705#comment-19705.

Manually copying files and database entries may take even longer and may be prone to error, because you'd probably have to update quite some database entries to match the table relationships and other things.

Best,
Oliver

Thank you. Can you recomend me a hosting server with setting I need? I have a shared hosting now and I am not sure I can change settings there.

If I copy files and database manually will I still have problems with database relationships if I will paste folders and db tables to a new almost empty site?

otacke's picture

Hi ksen-pol!

You should be able to add MIME types in an .htaccess file if necessary.

Regarding the database: Very hard to tell and I rather doubt that will work unless there's a clean H5P slate.

Best,

Oliver 

Thank you. Adding  in an .htaccess file worked!

I can copy files in the browser now. But I also want to change the format of images. Images ar in .jpeg  now and I want to convert them to .webp (maybe after downloading on my pc) and paste this new converted images.

In what folders can I find images after I paste on the new site or on the old site before I copy?

And to create a clear structure of files in the export folder is there any way for my future matereals to name .h5p files using node names instead of numbers.

otacke's picture

Hi ksen-pol!

The images are stored in their respective content folder in /wp-uploads/h5p/h5p/content Not sure if all browsers support webp by the way.

H5P export files should already bear the name that you have given them in their title followed by the content id number.

Best,
Oliver

Thank you. It works but I have some problems.

If I do it not with the editor what folders and tables of database should I copy?

 

I have 400 files in the export folder. I need to copy 300 of them. It takes a lot of time to paste it with the editor. And the second problem is that the names of the files don’t show the name of the node (they consist just of the numbers) and there are also files of different versions of the same node (maybe cause of editing or renaming, I am not sure). After I paste I have some versions of the same node and it takes a lot of time to figure out which one is new one.

How can I fix it?

 

Or is there any other way?

 

Can I paste multiple node?

 

 

Or can I export just the newest version with node name as the file name?

 

I also tryed to download fexport files manually from the node in the browser with the "reuse" button. But it is not working (screenshoot) 

screenshot

If it is not possible may be I can update exported files to have just new versions?