stephan Posted September 23, 2009 Share Posted September 23, 2009 Bonjour,Si quelqu'un à une idée ou une solution à mon problème je suis preneur J'explique :J'ai une version en prod, et une version en test et secours.L'idée est de rapatrier automatiquement la base de donnée du site en prod vers le site de secours via un module.Dans un premier temps, je pensais à un module qui fait le ménage dans les bases comme suit : DROP TABLE `ps_access`, `ps_accessory`, `ps_address`, `ps_alias`, `ps_attribute`, `ps_attribute_group`, `ps_attribute_group_lang`, `ps_attribute_impact`, `ps_attribute_lang`, `ps_block_cms`, `ps_carrier`, `ps_carrier_lang`, `ps_carrier_zone`, `ps_cart`, `ps_cart_discount`, `ps_cart_product`, `ps_category`, `ps_category_lang`, `ps_category_product`, `ps_cms`, `ps_cms_lang`, `ps_configuration`, `ps_configuration_lang`, `ps_connections`, `ps_connections_page`, `ps_country`, `ps_country_lang`, `ps_currency`, `ps_customer`, `ps_customization`, `ps_customization_field`, `ps_customization_field_lang`, `ps_customized_data`, `ps_date_range`, `ps_delivery`, `ps_discount`, `ps_discount_category`, `ps_discount_lang`, `ps_discount_quantity`, `ps_discount_type`, `ps_discount_type_lang`, `ps_employee`, `ps_feature`, `ps_feature_lang`, `ps_feature_product`, `ps_feature_value`, `ps_feature_value_lang`, `ps_guest`, `ps_hook`, `ps_hook_module`, `ps_hook_module_exceptions`, `ps_image`, `ps_image_lang`, `ps_image_type`, `ps_lang`, `ps_location_coords`, `ps_manufacturer`, `ps_manufacturer_lang`, `ps_message`, `ps_meta`, `ps_meta_lang`, `ps_module`, `ps_module_country`, `ps_module_currency`, `ps_operating_system`, `ps_orders`, `ps_order_customization_return`, `ps_order_detail`, `ps_order_discount`, `ps_order_history`, `ps_order_message`, `ps_order_message_lang`, `ps_order_return`, `ps_order_return_detail`, `ps_order_return_state`, `ps_order_return_state_lang`, `ps_order_slip`, `ps_order_slip_detail`, `ps_order_state`, `ps_order_state_lang`, `ps_page`, `ps_pagenotfound`, `ps_page_type`, `ps_page_viewed`, `ps_product`, `ps_product_attribute`, `ps_product_attribute_combination`, `ps_product_comment`, `ps_product_comment_criterion`, `ps_product_comment_criterion_product`, `ps_product_comment_grade`, `ps_product_download`, `ps_product_lang`, `ps_product_sale`, `ps_product_tag`, `ps_profile`, `ps_profile_lang`, `ps_quick_access`, `ps_quick_access_lang`, `ps_range_price`, `ps_range_weight`, `ps_scene`, `ps_scene_category`, `ps_scene_lang`, `ps_scene_products`, `ps_search_engine`, `ps_sekeyword`, `ps_state`, `ps_subdomain`, `ps_supplier`, `ps_supplier_lang`, `ps_tab`, `ps_tab_lang`, `ps_tag`, `ps_tax`, `ps_tax_lang`, `ps_tax_state`, `ps_tax_zone`, `ps_web_browser`, `ps_zone`; On renomme les tables : ALTER TABLE `basemysql`.`ps_contact` RENAME TO `basemysql`.`ps_contactold`; ALTER TABLE `basemysql`.`ps_contact_lang` RENAME TO `basemysql`.`ps_contact_langold'; puis avec un textarea il execute les ordres de restauration du fichier sql exporté depuis l'autre site : /* Backup for www.xxxxxxxxxxxxxxxxx * at 1253690741 *//* Scheme for table ps_access */CREATE TABLE `ps_access` ( `id_profile` int(10) unsigned NOT NULL, `id_tab` int(10) unsigned NOT NULL, `view` int(11) NOT NULL, `add` int(11) NOT NULL, `edit` int(11) NOT NULL, `delete` int(11) NOT NULL, PRIMARY KEY (`id_profile`,`id_tab`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;etc... On permutte les tables contacts : DROP TABLE `ps_contact`, `ps_contact_lang`; ALTER TABLE `basemysql`.`ps_contactold` RENAME TO `basemysql`.`ps_contact`; ALTER TABLE `basemysql`.`ps_contact_langold` RENAME TO `basemysql`.`ps_contact_lang'; merci à vous Link to comment Share on other sites More sharing options...
stephan Posted September 23, 2009 Author Share Posted September 23, 2009 Marche pas bien, je perds mon mot de passe !!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now