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

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
Member_2_6474242Senior Systems AdministratorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

McKnifeCommented:
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.
0
Member_2_6474242Senior Systems AdministratorAuthor 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
0
McKnifeCommented:
untried, but shouldn't it rather be
 start backup -backupTarget:\\ccc\backupofexchange24.8.18: -include:C:,F:,Z: -allCritical -vssfull -quiet  -KeepVersions:14
?
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Member_2_6474242Senior Systems AdministratorAuthor 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/
0
McKnifeCommented:
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).
0
kenfcampCommented:
As an alternative We've been using BackupAssist - https://www.backupassist.com/ - for years

It's relatively inexpensive and effective
0
Member_2_6474242Senior Systems AdministratorAuthor Commented:
I am currently evaluating other third party softwares
0
McKnifeCommented:
It would be best to try my suggestion, first, as it might lead to an easy solution that would not require 3rd party software.
0
Member_2_6474242Senior Systems AdministratorAuthor Commented:
tried it it did not work out
0
McKnifeCommented:
I was more interested in the execution result as task scheduler reports it on the history tab of the task - please share that text.
0
Member_2_6474242Senior Systems AdministratorAuthor 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".
0
McKnifeCommented:
Ok, and what is the result if you run that wbadmin... Command on an elevated command prompt?
0
Member_2_6474242Senior Systems AdministratorAuthor 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.
0
McKnifeCommented:
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

1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Member_2_6474242Senior Systems AdministratorAuthor 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
0
McKnifeCommented:
Can be one task. Both lines one after the other in a batchfile.
0
Member_2_6474242Senior Systems AdministratorAuthor 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
0
McKnifeCommented:
Why is there a ":" After the location you save to? Remove it.
0
McKnifeCommented:
Correct the syntax error and all is well - why fall silent? :-)
0
Member_2_6474242Senior Systems AdministratorAuthor 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
0
McKnifeCommented:
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.
0
Member_2_6474242Senior Systems AdministratorAuthor 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
0
McKnifeCommented:
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?
0
Member_2_6474242Senior Systems AdministratorAuthor 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
0
McKnifeCommented:
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
0
Member_2_6474242Senior Systems AdministratorAuthor Commented:
i will try this out and let you know if i have any other queries. Thanks for your clarifications
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Storage Software

From novice to tech pro — start learning today.