I have the following situation.

We have a production site with a Webform page in use. Drupal content updates are first made on a staging site. After being reviewed and approved, the contents of the staging site would be pushed to update the production site. This could be done on a weekly basis, or as needed depending on the frequency of the content updates.

The staging site's files would be copied to the production site. The staging database would be exported and imported into the production database.

The plan is to overwrite the whole Drupal database of the production site, except preserving the Webform submission data already saved on the production site, so that they are not overwritten by the periodic content updates from the staging site.

Based on what I have read on Webform and by inspecting the database, it seems these two tables hold all the submissions data: "webform_submissions" and "webform_submitted_data".

I am wondering, in order not to overwrite the existing Webform submissions data on the production site, is it simply to exclude these two tables when making the database export from the staging database, so that these two tables would not be disturbed when importing the database?

Another idea is to use a module like Webform Import to first export the production site's Webform submissions data, then import the staging site's database (which has the whole Drupal database), finally re-import the submissions data from the production site.

However, it is simpler to just leave the two tables alone when importing the database export from the staging site.

Any advice and recommendation will be appreciated. Thank you.

Comments

DanChadwick’s picture

Status: Active » Fixed

This is a horribly flawed way to push content to production. You risk all sorts of database integrity errors. For example, the highest serial number in use is stored in the webform (although I think the submission table may also be checked).

You need some other mechanism for pushing content up to production than copying the database and files. That sort of strategy is well beyond the webform issue queue. In general, I suggest that you add data to the existing production database and never replace tables or file directories.

Also, be sure to update to 7.x-4.4 or higher. You are using an insecure version.

tommyyan’s picture

Thank you for your advice and recommendation.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.