2

I'm migrating from the test environment to the live environment, both of which have a separate set of users/logins/privileges.

How do I not overwrite this information when migrating from one site to another?

1

Assuming that you are using the Backup and Migrate module (as per your title), just use the feature to exclude selected tables, similar to what is described in the answer to the question about "Backup and Migrate exclusion recommendations?", which states:

I have following tables to exclude data (not to exclude the table altogether):

  • all cache_* tables
  • ctools_views_cache
  • ctools_object_cache
  • flood
  • history
  • queue
  • semaphore
  • watchdog
  • search_index

Usually search_index saves a lot of database size.

You may also want to look at these issues:

  • How to backup and migrate just the user accounts?: even though it's the opposite of what your question is about, it does provide some interesting background info about this topic, i.e (quote from it):

    The exclude table features are there because not all db data needs to be backed up (cache tables, search index, etc) and not all tables in a db are necessarily drupal tables (you might have wordpress installed in the same db and not want to back up those tables). You'll notice that there is no option to backup just part of a table. There is no way to backup all users with uid > x for example.

  • Default tables/data to exclude, which includes an interesting list of tables to not be migrated (pick what fits for you), i.e. (quote from it):

    When creating a backup profile, the module by default sets the following tables to have their data excluded according to issue #209647: Exclude advice:

    • cache
    • cache_filter
    • cache_calendar_ical
    • cache_menu
    • cache_page
    • cache_views
    • sessions
    • search_dataset
    • search_index
    • search_keywords_log
    • search_total
    • watchdog
    • accesslog
    • devel_queries
    • devel_times
  • Entire site backup excludes default/settings.php file: just be aware that that is how it works (to avoid surprises after restore).

  • Could you maybe make your answer a bit less link set, and a bit more answer? If linked posts will get deleted, I will still see th one on Drupal Answers. OP will not. And no one will see posts deleted from drupal.org – Mołot Jul 29 '15 at 20:50
1

If you want to move user data from a Drupal site to another, you need to use the Migrate module. The Backup and migrate module is for exporting and restoring database and files.

  • Please check the meaning of the "backup-and-migrate" tag (that was used for asking this question). It appears to me that this module is already being used ... Therefor I don't think this answer adds any value. Consider replacing it with a more appropriate answer (if you agree ....) – Pierre.Vriens Jul 29 '15 at 20:52
  • The problem you want to do something that drupal tells you to avoid, if you are sure about what youvare doing, then handle it with mysql directly, and at that point its out of drupal scope, but ones you want to do it in drupal way then backup and migrate is not the tool made for that, what is made for that migrate module, this is the drupal way, if you want the mysql answer im happy to provide but you can to list your question under mysql or any dbms :-) – Ziftman Jul 29 '15 at 22:20
  • The project page for the Backup and Migrate module clearly states: "Back up and restore your Drupal MySQL database, code, and files or migrate a site between environments." It can be used to migrate a site. – kiamlaluno Jul 30 '15 at 7:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.