[Autogenerated] Let's now explore backing up data using PowerShell.
When you're using Windows server as a backup and recovery solution,
you must first create a backup policy.
That's essentially a tailored plan detailing what when and where your data
will be backed up by invoking the new WB policy commander.
We can sketch out a blueprint ensuring our data safety and availability.
PowerShell also allows you to start backup jobs with start WB
backup and monitor them with get WB job that keeps you informed on
the backup status time for another demo.
And this one,
we'll schedule a backup defining when our data will be secured using
the new WB policy and set WB schedule command lists.
We establish a backup policy and schedule,
we'll then set the backup process in motion and then
verify that the backup has completed.
Let's now get started helping out carve rock fitness,
ensure all of their membership data is safely backed up and ready for a
restore to use all the features of Windows server backup.
We first need to ensure the feature is installed so we can do that with
install dash Windows feature and no restart is needed.
So we're good to go now that that's done, we can get down to business.
So first off, we need to create a new backup policy.
A backup policy is a set of configuration that defines what data is
backed up when it's backed up and where it's stored.
This is a crucial first step in automating the backup process.
I'm assigning the output of this command,
which is the policy itself to a variable.
So we can provide that as input for future commands.
Next, we need to specify where our backup will be stored.
This location is known as the backup target and to do that,
we can run new WB backup target.
This command is used to create a backup target object.
We're specifying the backup location as drive E here.
Next, you must add that target to the policy with the A WB backup target command.
All looks good.
Now let's specify the actual data.
We wanna be backed up.
In this case,
it's workout schedules and the membership data stored
in specific folders on the server.
So to specify that we first need to create a new file spec,
a file spec is Windows server backups way of
defining a location of what to back up.
So here I'm defining the workout schedules and membership data folders.
Next,
you must add that file spec created to the policy with
the A WB file spec command list.
Now that's done,
we'll set up a schedule for this backup to ensure it happens automatically
every night at 2 a.m. Now that we have the schedule set up,
let's set this backup policy to be the active backup policy on the server.
So now that the policy is created and scheduled,
you can then view this policy with the GWB policy command lit.
We have the schedule,
the backup target where it's going to back up to the file specs
to backup and everything else looks just fine.
Oh,
the backup is set to run automatically at 2 a.m. every
night for the purpose of this demo.
Let's go ahead and initiate the backup process now and we
do that with start WB backup and we provide the policy
object that we just have created.
So while this is going on, you can see that start WB backup,
it holds up the console as it's going through the backup.
I can't type anything in here.
All right, looks like it completed successfully.
Now,
if you need to kick this off and go do something else or you
need to do something else in the console instead of waiting for
the entire backup process to finish.
What you can do is kick off the policy with the async switch
and when you run it with async switch, it kicks off a job in the background.
That way you don't have to worry about it.
And then to find the job, you can run, get WB job and used previous and specify.
I want the last one that was kicked off.
And then now you can see that the job was already completed so you can
run get WB job to monitor that job in the background.
All right.
So now that it has succeeded,
let's check out to see what it created in the backup target,
you can see that it created a Windows image backup folder with the
name of the machine being backed up as a sub folder.
This contains backup information required to do a restore.
So we have now successfully navigated the process of scheduling
initiating and verifying a backup operation.