Unable to schedule a backup to share drive as it only stores one backup

Member_2_6474242
Member_2_6474242 used Ask the Experts™
on
Hi All

I am trying to schedule a backup to a share location but i get the message attached. I would like to keep the full backup for at least a week

I am using windows server 2012 standard and using windows server backup from server manager to backup

Any suggestion on how i can accomplish my taskbackup image error
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2018

Commented:
the command line of windows server backup (wbadmin.exe) knows a parameter -keepversions. So
wbadmin.exe start backup... -keepversions 7
would keep 7 versions before it starts overwriting the oldest.
Member_2_6474242Systems Administrator

Author

Commented:
In my actions i have added

wbadmin under program/script of task scheduler

user add arguments (optional)
delete backup -KeepVersions:14 start backup -backupTarget:\\ccc\backupofexchange24.8.18: -include:C:,F:,Z: -allCritical -vssfull -quiet

please correct me if i am wrong

The above fails with 0xffffffff
Distinguished Expert 2018

Commented:
untried, but shouldn't it rather be
 start backup -backupTarget:\\ccc\backupofexchange24.8.18: -include:C:,F:,Z: -allCritical -vssfull -quiet  -KeepVersions:14
?
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Member_2_6474242Systems Administrator

Author

Commented:
Hi Mcknife

I still get 0xffffffff as the last run result

I used the following to setup. I used the below to setup

https://practical365.com/exchange-server/schedule-windows-server-backup-exchange-2010/
Distinguished Expert 2018

Commented:
For a test, please exchange the command to something different: just "notepad" and see what the execution result is (you may start the task manually for that test).
As an alternative We've been using BackupAssist - https://www.backupassist.com/ - for years

It's relatively inexpensive and effective
Member_2_6474242Systems Administrator

Author

Commented:
I am currently evaluating other third party softwares
Distinguished Expert 2018

Commented:
It would be best to try my suggestion, first, as it might lead to an easy solution that would not require 3rd party software.
Member_2_6474242Systems Administrator

Author

Commented:
tried it it did not work out
Distinguished Expert 2018

Commented:
I was more interested in the execution result as task scheduler reports it on the history tab of the task - please share that text.
Member_2_6474242Systems Administrator

Author

Commented:
Hi McKnife
Please find below
Task Scheduler started "{dd7b6332-e69c-4fd0-a44e-77d34cc41db9}" instance of the "\Exchangebackup7pm" task for user "Igg\Administrator".
Task Scheduler launched action "C:\Windows\system32\wbadmin.EXE" in instance "{dd7b6332-e69c-4fd0-a44e-77d34cc41db9}" of task "\Exchangebackup7pm".
Task Scheduler launched "{dd7b6332-e69c-4fd0-a44e-77d34cc41db9}"  instance of task "\Exchangebackup7pm"  for user "Administrator" .
Task Scheduler successfully completed task "\Exchangebackup7pm" , instance "{dd7b6332-e69c-4fd0-a44e-77d34cc41db9}" , action "C:\Windows\system32\wbadmin.EXE" with return code 0.
Task Scheduler successfully finished "{dd7b6332-e69c-4fd0-a44e-77d34cc41db9}" instance of the "\Exchangebackup7pm" task for user "igg\Administrator".
Distinguished Expert 2018

Commented:
Ok, and what is the result if you run that wbadmin... Command on an elevated command prompt?
Member_2_6474242Systems Administrator

Author

Commented:
C:\Windows\system32>wbadmin start backup -backupTarget:\\tee\sss24.8.18: -include:C:,F:,Z: -allCritical -vssfull -quiet  -KeepVersions:14
wbadmin 1.0 - Backup command-line tool
(C) Copyright 2012 Microsoft Corporation. All rights reserved.

ERROR - One of the parameters or options provided is unexpected: KeepVersions.
See the syntax below.

Syntax: WBADMIN START BACKUP
    [-backupTarget:{<BackupDestinationVolume> | <TargetNetworkShare>}]
    [-include:<ItemsToInclude>]
    [-nonRecurseInclude:<ItemsToInclude>]
    [-exclude:<ItemsToExclude>]
    [-nonRecurseExclude:<ItemsToExclude>]
    [-hyperv:<HypervComponentsToInclude>]
    [-allCritical]
    [-systemState]
    [-noVerify]
    [-user:<UserName>]
    [-password:<Password>]
    [-noInheritAcl]
    [-vssFull | -vssCopy]
    [-quiet]
    [-allowDeleteOldBackups]

Description:  Creates a backup using specified parameters. If no parameters
are specified and you have created a scheduled daily backup, this command
creates the backup by using the settings for the scheduled backup.

Parameters:
-backupTarget  Specifies the storage location for this backup. Requires a
                hard disk drive letter (f:), a volume GUID-based path in the
                format of \\?\Volume{GUID}, or a Universal Naming Convention
                 (UNC) path to a remote shared folder (\\<servername>\
                <sharename>\). By default, the backup will be saved at:
                \\<servername>\<sharename>\WindowsImageBackup\
                <ComputerBackedUp>\.
                Important: If you save a backup to a remote shared folder,
                that backup will be overwritten if you use the same folder to
                backup the same computer again. In addition, if the backup
                operation fails, you may end up with no backup because the
                older backup will be overwritten, but the newer backup will
                not be usable. You can avoid this by creating subfolders in
                the remote shared folder to organize your backups. If you do
                this, the subfolders will need twice the space of the parent
                folder.

-include       Specifies the comma-delimited list of items to include in the
                backup. You can include multiple files, folders, or volumes.
                Volume paths can be specified using volume drive letters,
                volume mount points, or GUID-based volume names. If you use a
                GUID-based volume name, it should be terminated with a
                backslash (\). You can use the wildcard character (*) in the
                file name when specifying a path to a file. Should be used
                only when the -backupTarget parameter is used.

-exclude       Specifies the comma-delimited list of items to exclude from
                the backup. You can exclude files, folders, or volumes.
                Volume paths can be specified using volume drive letters,
                volume mount points, or GUID-based volume names. If you use a
                GUID-based volume name, it should be terminated with a
                backslash (\). You can use the wildcard character (*) in the
                file name when specifying a path to a file. Should be used
                only when the -backupTarget parameter is used.

-nonRecurseInclude   Specifies the non-recursive, comma-delimited list of
                items to include in the backup. You can include multiple
                files, folders, or volumes. Volume paths can be specified
                using volume drive letters, volume mount points, or
                GUID-based volume names. If you use a GUID-based volume name,
                it should be terminated with a backslash (\). You can use the
                wildcard character (*) in the file name when specifying a
                path to a file. Should be used only when the -backupTarget
                parameter is used.

-nonRecurseExclude   Specifies the non-recursive, comma-delimited list of
                items to exclude from the backup. You can exclude files,
                folders, or volumes. Volume paths can be specified using
                volume drive letters, volume mount points, or GUID-based
                volume names. If you use a GUID-based volume name, it should
                be terminated with a backslash (\). You can use the wildcard
                character (*) in the file name when specifying a path to a
                file. Should be used only when the -backupTarget parameter is
                used.

-hyperv         Specifies the comma-delimited list of components to be included
                in backup. The identifier could be component name or component
                guid(with or without braces).

-allCritical   Creates a backup that includes all critical volumes (critical
                volumes contain the operating system files and components) in
                addition to any other items that you specified with the
                -include parameter. This parameter is useful if you are
                creating a backup for bare metal recovery. Should be used
                only when the -backupTarget parameter is used.

-systemState   Creates a backup that includes the system state in addition to
                any other items that you specified with the include parameter.

-noVerify      Specifies that backups written to removable media (such as a
                DVD) are not verified for errors. If you do not use this
                parameter, backups saved to removable media are verified for
                errors.

-user          If the backup is saved to a remote shared folder, specifies the
                user name with write permission to the folder.

-password      Specifies the password for the user name that is provided for
                the parameter -user.

-noInheritAcl  Applies the access control list (ACL) permissions that
                correspond to the credentials specified by -user and
                -password to \\<servername>\<sharename>\WindowsImageBackup\
                <ComputerBackedUp>\ (the folder that contains the backup).
                To access the backup later, you must use these credentials or
                be a member of the Administrators group or the Backup
                Operators group on the computer with the shared folder.
                If -noInheritAcl is not used, the ACL permissions from the
                remote shared folder are applied to the <ComputerBackedUp>
                folder by default so that anyone with access to the remote
                shared folder can access the backup.

-vssFull       Performs a full backup using the Volume Shadow Copy Service
                (VSS). Each file's history is updated to reflect that it was
                backed up. If this parameter is not used WBADMIN START BACKUP
                makes a copy backup, but the history of files being backed up
                is not updated.
                Caution: Do not use this parameter if you are using a product
                other than Windows Server Backup to back up applications that
                are on the volumes included in the current backup. Doing so
                can potentially break the incremental, differential, or other
                type of backups that the other backup product is creating.

-vssCopy       Performs a copy backup using VSS. The history of the files
                being backed up is not updated. This is the default value.

-quiet         Runs the command with no prompts to the user.

-allowDeleteOldBackups   Overwrites the backups found before upgrade.

Examples:
WBADMIN START BACKUP -backupTarget:f: -include:e:,
d:\mountpoint,\\?\Volume{cc566d14-44a0-11d9-9d93-806e6f6e6963}\
-hyperv:vm1,{627cf8de-2967-4c39-852c-655a691d245f}

WBADMIN START BACKUP -backupTarget:f: -include:e:\*,
d:\mountpoint\*,\\?\Volume{cc566d14-44a0-11d9-9d93-806e6f6e6963}\
-exclude:e:\folder\*

WBADMIN START BACKUP -backupTarget:\\server\share
-hyperv:vm1,{627cf8de-2967-4c39-852c-655a691d245f}

Remarks:  If you want to back up an application for recovery, you must back
up the entire volume that contains the application and application data.
Distinguished Expert 2018
Commented:
Sorry, I looked it up and the syntax is
wbadmin delete backup -KeepVersions:14

Open in new window

Afterwards, run the backup
wbadmin start backup -backupTarget:\\tee\sss24.8.18: -include:C:,F:,Z: -allCritical -vssfull -quiet

Open in new window

Member_2_6474242Systems Administrator

Author

Commented:
Hi McKnife

Does this mean that i have to schedule 2 tasks. Can the keep versions be included in
wbadmin start backup -backupTarget:\\tee\sss24.8.18: -include:C:,F:,Z: -allCritical -vssfull -quiet
Distinguished Expert 2018

Commented:
Can be one task. Both lines one after the other in a batchfile.
Member_2_6474242Systems Administrator

Author

Commented:
Hi McKnife

It still doesn't work. The task starts successfully but is unable to start the windows server backup

When i try that command on cmd with admin i get
C:\Windows\system32>wbadmin start backup -backupTarget:\\xxx\Mailbackup\17.9.18:
 -include:C:,F:,Z: -allCritical -vssfull -quiet
wbadmin 1.0 - Backup command-line tool
(C) Copyright 2012 Microsoft Corporation. All rights reserved.

Retrieving volume information...
This will back up (EFI System Partition),(C:),Database(F:),(Z:) to \\xxx\Mailbac
kup\17.9.18:.
ERROR - The specified backup location could not be found or is not a
supported backup storage location.

I am already backing up to this same location without any errors using backup once
Distinguished Expert 2018

Commented:
Why is there a ":" After the location you save to? Remove it.
Distinguished Expert 2018

Commented:
Correct the syntax error and all is well - why fall silent? :-)
Member_2_6474242Systems Administrator

Author

Commented:
Hi Mcknife

Please note wbadmin delete backup -KeepVersions:14 doesnt work as it overrides the backup that is at the current location

Requesting assistance to resolve that
Distinguished Expert 2018

Commented:
wbadmin delete backup -KeepVersions:14

Open in new window

Does what it is supposed to. It deletes all but the latest 14 versions - at least for me.

Please describe exactly what is happening on your side.
Member_2_6474242Systems Administrator

Author

Commented:
Once the backup is done lets say on \\server\share. I get a backup done on day one so all is good. On day 2 it replaces the backup that it had on day 1. It doesn't keep the backup
Distinguished Expert 2018

Commented:
That was understood before. Nothing new.
I asked how exactly you proceed command-wise that makes you think keepversions does not work (because it does).
I guess it works for you just as expected, but the newer backup possibly overwrites the old one because of lack of disk space?
Member_2_6474242Systems Administrator

Author

Commented:
i have a backup space of 2.5TB and my backup uses approximately 550GB. The reason why i say keepversions doesnt work is because when i try to restore i should see the number of backups that are there but it shows only one or maybe I am missing something here

Shouldn't it keep the backups for the number of days specified
Distinguished Expert 2018

Commented:
Here, it does. Will show you a screenshot, maybe it's just a misunderstanding at your end... See, if I start the recovery wizard, it sees 4 backups (keepversoins:4 is set here), although file explorer suggests, it's only one backup (->only the folder Backup 2018-09-26 can be seen). But still it works like this, so within that folder, there are differential files for the other 3 days before 26th of september, understood? And that's why it works. These are 4 different backups.
Capture.PNG
Member_2_6474242Systems Administrator

Author

Commented:
i will try this out and let you know if i have any other queries. Thanks for your clarifications

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial