Skip to content

What is MSBACKUP Windows command?

MSBACKUP is a command-line utility in Windows used to back up and restore files and directories. It allows for full or partial backups, scheduling backups, and specifying backup locations. The command is useful for creating and managing backups efficiently.

MSBACKUP Syntax:

Terminal window
msbackup [option] [parameters]

MSBACKUP Options:

OptionDescription
/BSpecifies the backup file to create.
/TSpecifies the type of backup.
/DSpecifies the description for the backup file.
/SSpecifies the source files to include in the backup.
/AAdds files to an existing backup.

Parameters:

ParameterDescription
drive:\pathSpecifies the source or destination location for the backup.
backupnameSpecifies the name of the backup file to create.

MSBACKUP Command Usage Examples:

Backup a Directory

Terminal window
msbackup c:\backup\ /d "Backup of important files" /t full /e

Backs up the directory “c:\backup” with a description “Backup of important files” using a full backup type.

Restore Files from a Backup

Terminal window
msbackup /r /p c:\backup\ /e

Restores files from a backup located in “c:\backup”.

Schedule a Backup Job

Terminal window
at 06:00 /every:M,T,W,Th,F msbackup c:\backup\ /d "Daily Backup" /t incremental /e

Schedules a daily backup job at 6:00 AM on weekdays for the directory “c:\backup” with a description “Daily Backup” using an incremental backup type.

Verify Backup Integrity

Terminal window
msbackup /v /p c:\backup\

Verifies the integrity of a backup located in “c:\backup”.

List Backup Contents

Terminal window
msbackup /l /p c:\backup\

Lists the contents of a backup located in “c:\backup”.

How do I use msbackup in Windows?

To use the msbackup command in CMD, execute the following command:

Terminal window
msbackup --backup "C:\sourceFolder" --destination "D:\backupFolder"

What is the syntax for restoring files using msbackup?

To restore files using msbackup in CMD, use the following command:

Terminal window
msbackup --restore "D:\backupFolder" --destination "C:\restoredFiles"

How can I schedule automatic backups with msbackup?

To schedule automatic backups with msbackup, you can use the Windows Task Scheduler in combination with the msbackup command. Create a task that runs the msbackup command with the desired options at specified intervals.

Is it possible to compress the backup files with msbackup?

Yes, you can compress the backup files using msbackup by adding the --compress option to the command. This will create a compressed backup file in the specified destination folder.

Can I exclude certain files or folders from being backed up with msbackup?

Yes, you can exclude specific files or folders from being backed up with msbackup by using the --exclude option followed by the path to the file or folder you want to exclude.

How do I view the contents of a backup file created with msbackup?

You can view the contents of a backup file created with msbackup by using the --list option followed by the path to the backup file. This will display a list of files contained in the backup.

How do I force overwrite existing files during the restoration process with msbackup?

To force overwrite existing files during the restoration process with msbackup, use the --overwrite option in the command. This will replace any existing files in the destination folder with the restored files from the backup.

Can I run msbackup in verbose mode to see detailed information during the backup process?

Yes, you can run msbackup in verbose mode by adding the --verbose option to the command. This will provide detailed information about each file being backed up or restored.

Applications of the MSBACKUP Command

  • Creating backups of files and directories
  • Compressing file backups to save space
  • Restoring files from backup archives