diff --git a/core/lib/Drupal/Core/Command/DbDumpCommand.php b/core/lib/Drupal/Core/Command/DbDumpCommand.php
index 10ddcdf..64020fe 100644
--- a/core/lib/Drupal/Core/Command/DbDumpCommand.php
+++ b/core/lib/Drupal/Core/Command/DbDumpCommand.php
@@ -11,7 +11,9 @@
 use Drupal\Core\Database\Connection;
 use Drupal\Core\Extension\ModuleHandlerInterface;
 use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Output\OutputInterface;
 
 /**
@@ -63,6 +65,21 @@ class DbDumpCommand extends Command {
   protected $schemaOnly = ['cache.*', 'sessions', 'watchdog'];
 
   /**
+   * Flag to denote that data should be exported.
+   */
+  protected $exportData = TRUE;
+
+  /**
+   * Flag to denote that the schemas should be exported.
+   */
+  protected $exportSchema = TRUE;
+
+  /**
+   * An array of tables to export. Defaults to all.
+   */
+  protected $exportTables = [];
+
+  /**
    * Construct the database dump command.
    *
    * @param \Drupal\Core\Database\Connection $connection
@@ -86,7 +103,28 @@ function __construct(Connection $connection, ModuleHandlerInterface $module_hand
    */
   protected function configure() {
     $this->setName('dump-database-d8-mysql')
-      ->setDescription('Dump the current database to a generation script');
+      ->setDescription('Dump the current database to a generation script')
+      // Data-only option.
+      ->addOption(
+        'data-only',
+        NULL,
+        InputOption::VALUE_NONE,
+        'Only export data, not the table create statements.'
+      )
+      // Schema-only option.
+      ->addOption(
+        'schema-only',
+        NULL,
+        InputOption::VALUE_NONE,
+        'Only export table schemas, no data.'
+      )
+      // Limit to certain tables.
+      ->addArgument(
+        'tables',
+        InputArgument::IS_ARRAY,
+        'A space-separated list of tables to export. All tables are exported if this is not set.',
+        []
+      );
   }
 
   /**
@@ -98,6 +136,14 @@ protected function execute(InputInterface $input, OutputInterface $output) {
       $output->setDecorated(FALSE);
     }
 
+    $this->exportTables = $input->getArgument('tables');
+    if ($input->getOption('data-only')) {
+      $this->exportSchema = FALSE;
+    }
+    elseif ($input->getOption('schema-only')) {
+      $this->exportData = FALSE;
+    }
+
     $output->writeln($this->generateScript());
   }
 
@@ -110,8 +156,11 @@ protected function execute(InputInterface $input, OutputInterface $output) {
   protected function generateScript() {
     $tables = '';
     foreach ($this->getTables() as $table) {
+      // The schema is needed for the insert statements, even if it won't be
+      // exported.
       $schema = $this->getTableSchema($table);
-      $data = $this->getTableData($table);
+      // Only gather the data if it will be exported.
+      $data = $this->exportData ? $this->getTableData($table) : [];
       $tables .= $this->getTableScript($table, $schema, $data);
     }
     $script = $this->getTemplate();
@@ -130,6 +179,10 @@ protected function generateScript() {
    */
   protected function getTables() {
     $pattern = $this->connection->tablePrefix() . '%';
+    if (!empty($this->exportTables)) {
+      return $this->exportTables;
+    }
+
     $tables = array_values($this->connection->schema()->findTables($pattern));
     foreach ($tables as $key => $table) {
       // The prefix is removed for the resultant script.
@@ -419,7 +472,9 @@ protected function getTemplate() {
    */
   protected function getTableScript($table, array $schema, array $data) {
     $output = '';
-    $output .= "\$connection->schema()->createTable('" . $table . "', " . Variable::export($schema) . ");\n\n";
+    if ($this->exportSchema) {
+      $output .= "\$connection->schema()->createTable('" . $table . "', " . Variable::export($schema) . ");\n\n";
+    }
     if (!empty($data)) {
       $insert = '';
       foreach ($data as $record) {
diff --git a/core/modules/system/src/Tests/Update/DbDumpTest.php b/core/modules/system/src/Tests/Update/DbDumpTest.php
index 96bcfdb..5d88b65 100644
--- a/core/modules/system/src/Tests/Update/DbDumpTest.php
+++ b/core/modules/system/src/Tests/Update/DbDumpTest.php
@@ -172,6 +172,74 @@ public function testDbDumpCommand() {
   }
 
   /**
+   * Tests the data-only option.
+   */
+  public function testDataOnly() {
+    if ($this->skipTests) {
+      $this->pass("Skipping test since the DbDumpCommand is currently only compatible with MySql");
+      return;
+    }
+
+    $application = new DbDumpApplication(Database::getConnection(), $this->container->get('module_handler'));
+    $command = $application->find('dump-database-d8-mysql');
+    $command_tester = new CommandTester($command);
+    $command_tester->execute([
+      '--data-only' => NULL,
+      'tables' => ['block_content', 'config']
+    ]);
+
+    // Table create command is not exported.
+    $pattern = preg_quote("\$connection->schema()->createTable('config', array(");
+    $this->assertFalse(preg_match('/' . $pattern . '/', $command_tester->getDisplay()), 'The table create statement is not exported when `--data-only` is set');
+
+    // Table data is exported.
+    $pattern = preg_quote("\$connection->insert('config')");
+    $this->assertTrue(preg_match('/' . $pattern . '/', $command_tester->getDisplay()), 'Table data is properly exported to the script.');
+
+    // Only table data from 'config' was exported.
+    $pattern = preg_quote("\$connection->insert('block_content')");
+    $this->assertFalse(preg_match('/' . $pattern . '/', $command_tester->getDisplay()), 'The empty table, block_content, has not data exported.');
+    $pattern = preg_quote("\$connection->insert('users')");
+    $this->assertFalse(preg_match('/' . $pattern . '/', $command_tester->getDisplay()), 'Data from the users table is ignored since only `config` and `block_content` are specified.');
+
+    // The test data are in the dump (serialized).
+    $pattern = preg_quote(serialize($this->data));
+    $this->assertTrue(preg_match('/' . $pattern . '/', $command_tester->getDisplay()), 'Generated data is found in the exported script.');
+  }
+
+  /**
+   * Tests the schema-only option.
+   */
+  public function testSchemaOnlyOption() {
+    if ($this->skipTests) {
+      $this->pass("Skipping test since the DbDumpCommand is currently only compatible with MySql");
+      return;
+    }
+
+    $application = new DbDumpApplication(Database::getConnection(), $this->container->get('module_handler'));
+    $command = $application->find('dump-database-d8-mysql');
+    $command_tester = new CommandTester($command);
+    $command_tester->execute([
+      '--schema-only' => NULL,
+      'tables' => ['block_content', 'config']
+    ]);
+
+    // Table create command is exported.
+    $pattern = preg_quote("\$connection->schema()->createTable('config', array(");
+    $this->assertTrue(preg_match('/' . $pattern . '/', $command_tester->getDisplay()), 'The config table create statement is exported when `--schema-only` is set');
+    $pattern = preg_quote("\$connection->schema()->createTable('block_content', array(");
+    $this->assertTrue(preg_match('/' . $pattern . '/', $command_tester->getDisplay()), 'The block_content table create statement is exported when `--schema-only` is set');
+
+    // Table data is not exported.
+    $pattern = preg_quote("\$connection->insert('config')");
+    $this->assertFalse(preg_match('/' . $pattern . '/', $command_tester->getDisplay()), 'Table data is not exported to the script.');
+
+    // The test data are in the dump (serialized).
+    $pattern = preg_quote(serialize($this->data));
+    $this->assertFalse(preg_match('/' . $pattern . '/', $command_tester->getDisplay()), 'Generated data is not found in the exported script.');
+  }
+
+  /**
    * Test loading the script back into the database.
    */
   public function testScriptLoad() {
