title: backup and restore o sql server database through java
body: <p>In my Java project, I wish to allow users to backup and restore the project SQL Server database.</p>
  
  <p>Here is what I'm trying to do using JDBC, without success:</p>
  
  <pre><code>Statement callback = con.createStatement();
  
  String dbackup = "BACKUP DATABASE databaseName TO DISK = 'Path for the backup file";
  
  if(callBackupDbase != null) {
    callBackupDbase.execute(dbackup);
  }
  </code></pre>
  
  <p>How can I backup and restore the SQL Server database from Java?</p>