What is the Best Way to Backup Websites in Bulk for Windows Server Reinstall

PostAlmostAnything 1 Reputation point
2021-10-14T20:14:26.347+00:00

My hosting company says they can't fix what is wrong with the operating system on my VPS without doing a clean reinstall. I have had the problem for a few months but have not given the go ahead due to not knowing of a way to backup and restore all websites and database quickly.

If this were a LAMP environment I wouldn't have this problem because I would just download full account backups from cpanel, but I am not sure how to achieve the same results in Windows.

The problem is that I cannot run Windows Update due to an error that says "cannot get role and feature data"

Internet Information Services
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce Zhang-MSFT 3,736 Reputation points
    2021-10-15T02:22:34.903+00:00

    Hi @PostAlmostAnything ,

    Backup of website and configuration running on the IIS consists of serverl steps:

    • Backup of website files.
    • Backup of IIS certificates. You can get list of SSL certificates by using command: netsh http show sslcert.
    • Backup of IIS configuration.

    Microsoft suggest users use appcmd to create and restore backup. Run the command prompt with the administrator privileges and go to the following directory: cd c:\Windows\system32\inetsrv.

    Create the backup with command APPCMD add backup. This created a backup with an auto-generated name that represents the date and time of backup.
    140638-1.jpg

    You will see many configuration files in it.
    140688-2.jpg

    The backup is created successfully. You just need to copy the folder to another machine or any storage device.

    If you want to restore the backup, copy the folder to c:\windows\system32 on the new server. Then display the list of all available backups. appcmd list backup

    Recover IIS confifuration from the backup.
    APPCMD restore backup "20211015T100427".

    Note:

    • The same IIS version has to be used on both servers.
    • If any application pool is run not from the integrated accounts, they have to be available on another server as well.
    • Before recovery, you should export and migrate all current certificates to the new server.

    You can refer to these docs for more detailed information.
    Create a Backup with appcmd.
    Managing Backups


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,
    Bruce Zhang