Are you saying, without actually saying, that you want to backup and restore the SQL Server database? If so then it's a simple matter of executing an appropriate SQL statement against the server using a SqlCommand, just as you would for any SQL statement. The SQL Server documentation can provide you with the appropriate syntax for a BACKUP DATABASE statement and a RESTORE DATABASE statement.