CifraHQ backs up your tenant database automatically once a day at 12:10 AM Eastern Time. Each backup is exported as a .bacpac file (a portable, self-contained archive of schema and data), uploaded to secure cloud storage, and kept for 21 days. The Database Backups screen lists every available backup, lets you queue an on-demand backup at any time, and lets you download any file to your own machine for restoration on a SQL Server you control.
Go to Setup > System > Database Backups.
Database Backups, the rolling 21-day archive of tenant snapshots.
| Action | What it does |
|---|---|
| Backup Now | Queues an immediate manual backup. The job runs in the background; refresh after a few minutes to see the new file. Manual backups appear with a "Manual" badge in the Type column. |
| Refresh | Reloads the list. Use this after queuing a manual backup or to check whether the daily backup has finished. |
| Download | Streams the selected .bacpac file to your browser. The file name encodes the tenant alias and a UTC timestamp, for example acmecorp_20260501031007.bacpac. |
| Column | Description |
|---|---|
| File name | Full backup file name ({tenantAlias}_{yyyyMMddHHmmss}.bacpac). The timestamp is UTC. |
| Type | "Automatic" for the nightly job, "Manual" for files produced by the Backup Now button. |
| Created | Relative age of the backup ("3 hours ago", "2 days ago"). The newest file is always at the top. |
| Size | File size in human readable units (KB, MB, GB). Useful for estimating download time and target disk space. |
A .bacpac is the standard export format produced by the Microsoft DacFx framework. Unlike a traditional .bak (which is a binary, engine-specific snapshot restored with RESTORE DATABASE), a .bacpac is a logical archive containing:
You restore a .bacpac by importing it, which creates a brand new database on the target server. You cannot use RESTORE DATABASE for a .bacpac, and you cannot import a .bacpac on top of an existing database.
Before you start a restore, make sure you have:
sysadmin or at least dbcreator + securityadmin rights. Local SQL Server Developer Edition is free and works perfectly for restore testing.sqlpackage command line tool (cross platform, included with SSMS or downloadable as a standalone package from Microsoft)..bacpac file size. The import process expands the data, builds indexes, and writes a transaction log.The easiest way to import a .bacpac if you are on Windows.
Databases folder (not an existing database)..bacpac file you downloaded from CifraHQ, then click Next.CifraHQ_acmecorp_20260501_restore..bacpac expect roughly 2 to 10 minutes; for a multi-gigabyte file it can take much longer.Use this method for scripted, repeatable, or headless restores.
sqlpackage /Action:Import ^
/SourceFile:"C:\Backups\acmecorp_20260501031007.bacpac" ^
/TargetServerName:"localhost" ^
/TargetDatabaseName:"CifraHQ_acmecorp_restore" ^
/TargetUser:"sa" ^
/TargetPassword:"YourStrongPassword" ^
/TargetTrustServerCertificate:True
Cross platform shells (PowerShell, bash) use the same flag names; only the line continuation character differs (` in PowerShell, \ in bash).
Useful extra flags:
| Flag | When to use it |
|---|---|
/p:CommandTimeout=0 |
Disables per-command timeout. Set this for large restores that contain very wide tables. |
/p:DatabaseEdition=Standard |
When restoring to Azure SQL Database, sets the target service tier. Not used for on-premises SQL Server. |
/p:Storage=File |
Forces sqlpackage to use disk-backed temp storage instead of memory. Helps when restoring multi-gigabyte files on machines with limited RAM. |
/Diagnostics:True /DiagnosticsFile:"sqlpackage.log" |
Writes a verbose log next to your file. Indispensable when troubleshooting. |
Authentication options other than SQL login:
/TargetUser and /TargetPassword and add /TargetTrustServerCertificate:True. The current Windows account is used./TargetUser:"name@tenant.com" and /UniversalAuthentication:True.For macOS or Linux Users.
Ctrl+Shift+P (or Cmd+Shift+P on macOS) to open the command palette and run Data-tier Application Wizard..bacpac, name the new database, and click Deploy.After the import completes, run a few sanity queries against the new database to confirm the data is intact:
USE CifraHQ_acmecorp_restore;
-- Top tables by row count
SELECT TOP 25 t.name, p.rows
FROM sys.tables t
JOIN sys.partitions p ON p.object_id = t.object_id AND p.index_id IN (0, 1)
ORDER BY p.rows DESC;
-- Most recent activity (date columns vary by entity, this is a quick spot check)
SELECT TOP 10 Id, DateCreated, DateModified
FROM PurchaseOrderHeaders
ORDER BY DateModified DESC;
If the row counts and recent timestamps match your expectations from the live tenant at the time of the backup, the restore is good.
| Error message | Cause | Fix |
|---|---|---|
Could not import package. Unable to connect to target server |
Wrong instance name, blocked port, or TLS handshake failure | Verify the instance name with SSMS first. For local instances try localhost\SQLEXPRESS or (local). Add /TargetTrustServerCertificate:True to the sqlpackage command if the server uses a self-signed certificate. |
The database '<name>' already exists |
A database with the chosen name is already on the server | Pick a different name, or drop the existing database first (DROP DATABASE [name] in SSMS). |
User '...' does not exist in master or Login failed for user '...' |
The bacpac references SQL logins that the target server does not have | Add /p:IgnorePermissions=True /p:IgnoreUserSettingsObjects=True to the sqlpackage command. The data restores cleanly; you create new logins afterwards. |
Cannot find the object because it does not exist or you do not have permissions |
The connecting account lacks dbcreator or sysadmin |
Connect as sa, or have a sysadmin grant your login the dbcreator server role. |
Conversion failed when converting date and/or time from character string |
Server collation differs from the source (rare with CifraHQ Exports) | Restore to a fresh database created with collation SQL_Latin1_General_CP1_CI_AS (CifraHQ's default), or add /p:DatabaseLockTimeout=0 and retry. |
Internal Error. The database platform service ... is unavailable |
DacFx version on your client is older than the source server | Install the latest sqlpackage from Microsoft (https://aka.ms/sqlpackage-windows). The bundled SSMS version is sometimes a release behind. |
Out of memory during import |
Large bacpac, low RAM client | Re-run with /p:Storage=File, or run the restore on a machine with at least 16 GB RAM. |
CifraHQ_<tenant>_<yyyyMMdd>_restore makes it obvious which environment a sandbox came from and which day it was captured./TargetServerName:yourserver.database.windows.net and use the /p:DatabaseEdition, /p:DatabaseServiceObjective, and /UniversalAuthentication:True flags appropriate to your subscription.Related: Tenant Configuration · System Logs
Was this page helpful?