Closed (outdated)
Project:
Backup and Migrate
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Dec 2011 at 12:22 UTC
Updated:
28 Sep 2017 at 19:24 UTC
Jump to comment: Most recent
Comments
Comment #1
neskenazi commentedI started using this module and this too would be a nice addition
I found this primarily because when looking for Sources, the module adds any MySQL databases that are registered as Destinations, and because my sites are in MS SQL, it finds none and the module is useless.
Comment #2
sherakama commentedPlus one for this support
Comment #3
redbull247365 commentedPlus two for this support!
Comment #4
mgrzadziel commentedPlus this support
Comment #5
ronan commentedRenaming so it matches the other dbms support requests.
Comment #6
drikus commentedPlus one for this support
Comment #7
thorsten. commentedPlus two for this support!
Comment #8
mrseek commentedGood morning, there is any intention about this support?
Comment #9
ronan commentedI have no plans to write it (I'd be utterly unqualified) so someone with MS SQL Server skills will have to step up. I have not heard of anybody who is working on it at the moment.
Comment #10
damienmckennaI should get a chance to look at this shortly - I need a reliable way of doing this and I'd like to be able to handle it from within Drupal, rather than just using the MSFT tools.
Comment #11
ronan commented@DamienMcKenna that'd be awesome. Let me know if you need any help with the plumbing or architecture. Can't help much with the actual mechanics of the MSFT db export but I'm available if you have questions.
Comment #12
damienmckennaHave started poking at this, http://msdn.microsoft.com/en-us/library/ms186865.aspx seems to be the best documentation for the SQL commands for backing up and restoring the database. The only problem is that SQL Server doesn't use "normal" SQL files for doing its backups & restorations, and I don't see it being possible to exclude tables from the backup ala MySQL, so it's going to be different. Either that or build a mysqldump-compatible exporter, but that's crazy-talk.
Comment #13
damienmckennaAnother option appears to be the "bcp" command. It can be used to both import and export data into various formats, but it seems to only deal with one file and/or table at a time, i.e. one file into one table, and not one file into multiple tables. Furthermore, it requires use of a "format" file, so potentially two files for every table. I suppose post-export the integration could then zip the files into one archive, that way it only had to deal with one file?
So, the bcp option seems like the closest to how MySQL is handled, i.e. it provides table-level control, but the fact that it'll create a ton of individual files is a problem.
Comment #14
damienmckennaAs a test, I created a format (i.e. schema) XML file for the "block" table using the following command:
$ bcp [table] format nul -c -x -f [table].xml -S[hostname,port] -U[username] -P'[password]' -d[databasename]That resulted in the following:
Comment #15
damienmckennaThe following creates a tab-delimited text file with the data from a table.
$ bcp [table] out [table.csv] -c -S[hostname,port] -U[username] -P'[password]' -d[databasename]Because of the fact that the file only contains data, I think it'd be worthwhile exporting the format XML file first.
Comment #16
damienmckennaAfter running into a number of problems, the client opted to change to MySQL, so I won't be pursuing this further. Sorry.
Comment #17
WolfPlayer commentedI struggled with this too. We are a complete Microsoft shop. We have Drupal running on IIS against MS SQL Server. We develop locally using WebMatrix/IIS Express. Active Directory is used for all logins. We have multiple developers working on the project so each needs their own DB so that they don't stomp on each other's changes. I was hoping to use Backup and Migrate for moving from local development to our staging environment and finally to our production environment (3 environments). But, as others have found, this module is relatively useless if you are using SQL Server. I wrote a PowerShell script that accomplishes most of what I want; namely, to copy the prod database to my local machine and sync the prod files with my local machine for development. Don't get me wrong - it's no backup and migrate, lol. But, here is what I put together and use regularly. Use at your own risk but I've used it a hundred times. I'm also posting this in case anyone decides to pick up the torch for Backup and Migrate with regard to SQL Server.
Comment #18
couturier commentedThis feature request is 3 to 6 years old, and I'm not sure it would apply to developers going into 2018 with D8 taking over. Please open and re-file under the 8.x branch of Backup and Migrate if this is still desired.