Ola Hallengren maintenance solution TSQL script not deleting old backup files from my local SQL server

I have looked on Ola's site (https://ola.hallengren.com/frequently-asked-questions.html) and I did see this:
DatabaseBackup is not deleting old backup files. What could the problem be?
Verify that the SQL Server and SQL Server Agent service accounts have full control of the backup directory.
If that directory is a network share, verify that the SQL Server and SQL Server Agent service accounts have full control of the network share.
If you are using a proxy account, verify that the account is a member of the sysadmin server role and that it has full control of the backup directory and network share.
Verify that the file is not locked in the file system; for example, a backup or antivirus software could be locking the file.
DatabaseBackup has been designed not to delete transaction log backups that are newer than the most recent full or differential backup. This could explain why transaction log backups are not being deleted.
I followed these instructions and then I right clicked the "sp_delete_backuphistory" job under "SQL Server Agent > Jobs" folder and clicked the "Start job at step ..." option. The job successfully ran, but my .bak backup
files were still on located on my separate drive partition I use specifically for these backups. 
The SQL Server and the SQL Server Agent are both using the same AD account. 
Would any of you SQL gurus out there know how to resolve this?
Thank you 

The sp_delete_backuphistory job only deletes the historical info from the backup & restore tables in the msdb database. It does not do anything to the files on disk.
https://msdn.microsoft.com/en-us/library/ms188328.aspx
The code to actually purge the backup files from disk is inside the DatabaseBackup stored procedure. It is controlled by using the @CleanupTime parameter for that stored proc. Verify the value for that parameter is low enough to delete your files on disk. The
value is in hours, and I believe the default is 48 hours. The SQL agent job name usually starts with "DatabaseBackup...".

Similar Messages

  • HT5925 deleting old backup files from icloud ?

    How can we view and delete backup files on icloud?

    You can do that e.g. on your iOS device in "Settings > iCloud > Storage & Backup > Manage Storage"
    or on your Mac: System Preferences > iCloud > Manage... .

  • Why does Time machine not delete old backups

    I dont understand Why time machine is not deleting old backups. As it worked first time with the same size backup drive as the drive its backing up, I assumed it would just delete the old backup as needed. Do I need a bigger backup drive?

    Roglee wrote:
    I just want it to delete the old backup & replace it so i just have a copy. I guess i could just re format the drive each time but that just seems a waste of my time when TM should do this for me!
    If this is all you want to do, turn off Time Machine, download SuperDuper! and use it for free. This will clone whatever drive you want and the free trial will erase your back up drive each time. I can't remember if it will let you choose what to back up or if it wants the entire drive. Also, I'm not sure if the Scheduler works with the free trial. Below are some verbiage for SuperDuper!. Looks like if you want Scheduling you will have to purchase a license.
    Download Now! 
    You can download SuperDuper! v2.7.1 right now and back up and clone your drives for free— forever! 
    Buy Now!
    Buy now to unlock scheduling, Smart Update (which saves a lot of time), Sandboxes, scripting and more!
    Time Machine will keep making back ups and when it determines it needs space, it will delete older back ups. But it doesn't delete older ones each time it backs up.

  • Why does the new operating system not delete the moved files from their original location - it seems like an enormous waste of space, time and effort to clean up every file once you've moved it

    Why does the new operating system not delete the moved files from their original locations - it seems like an enormous waste of space, time and effort to clean up every file once you've moved it - also, when transferring large amounts of files it becomes a very large problem remembering which files were transferred and which not.

    You're going to need to be more specific, as I'm not quite sure I understand what you're talking about.
    If you're referring to copying from an external hard drive or flash drive, and you want to actually move files rather than copy them, you can hold down the option key to force it to do a "move" rather than a "copy." This is not new behavior, though... the Mac OS has worked this way as long as I can recall (and I've been using it since 1984).
    If you're having a problem with trying to move files from one place to another on a single drive causing them to be copied instead, that is likely because of some permissions issue preventing you from actually being able to move them.

  • I backup to an external hdd with Time Machine, when it ran out of space it did not delete old backups, now my internal hdd says its full when before it had heaps of space. I have searched for extra files but cant find any. Can anyone help, please.

    I backup to an external hdd with Time Machine, when it ran out of space it did not delete old backups, now my internal hdd says its full when before it had heaps of space. I have searched for extra files but cant find any. Can anyone help, please.

    First, empty the Trash if you haven't already done so. Then reboot. That will temporarily free up some space.
    To locate large files, you can use Spotlight as described here. That method may not find large folders that contain a lot of small files.
    You can also use a tool such as OmniDiskSweeper (ODS) to explore your volume and find out what's taking up the space. You can delete files with it, but don't do that unless you're sure that you know what you're deleting and that all data is safely backed up. That means you have multiple backups, not just one.
    Proceed further only if the problem hasn't been solved.
    ODS can't see the whole filesystem when you run it just by double-clicking; it only sees files that you have permission to read. To see everything, you have to run it as root.
    Back up all data now.
    Install ODS in the Applications folder as usual.
    Triple-click the line of text below to select it, then copy the selected text to the Clipboard (command-C):sudo /Applications/OmniDiskSweeper.app/Contents/MacOS/OmniDiskSweeper
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    I don't recommend that you make a habit of doing this. Don't delete anything while running ODS as root. If something needs to be deleted, make sure you know what it is and how it got there, and then delete it by other, safer, means.
    When you're done with ODS, quit it and also quit Terminal.

  • Time machine will not delete old backups

    time macine will not delete old backups....is there a manual way to do it

    Just let it run. It will manage itself fine, you may benefit though from reading Pondini's Time Machine FAQs

  • How can I delete undesirable backup files from time machine?

    Can anyone give me details of how to delete undesirable backup files from Time Machine,
    I'm trying to remove mackeeper which has been running since 2011
    And I'm stuck at the first hurdle......
    Thanks

    The problem I have is that i dont have an option to delete backups of this file on the options menu, and when I click delit or try to drag it to the trash I get a box saying " This operation can't be completed because backup items can't be modified"
    Iam really tempted to just delete mackeeper from HD library and Applications but it is stressed that I need to do the TM deletes first?
    Am stuck please help

  • Time machine will not delete old backup when space is needed

    Time machine says there is not enough space to complete backup yet will not delete old backups

    Start with C4.
    Time Machine Troubleshooting

  • Time capsule not deleting old backups

    My time capsule is no longer backing up due to lack of space.  How can I get it to delete old backsups?

    If you upgrade installed the OS, Mavericks.. then the TM seems to lose the ability to delete old backups..
    Step in and do in manually.
    See Q12 here.
    http://pondini.org/TM/FAQ.html

  • Firefox does not delete the .part file from my download folder after a successful download

    First off, I'm on a MacBook Pro, running 10.6.4 and FF3.6.12
    I've recently noticed that on occasion Firefox does not seem to delete the .part file associated with a successful download. The .part file (with a name consisting of a string of random characters followed by a .part extension) is visible in my Download folder stack, although not visible in the actual folder view. I cannot drag this file from the stack to the trash.
    The real problem stems from the fact that this seems to create a directory error on my hard drive. Were I to run Disk Utility (which I will have to do... again!), it would return with an error saying something like "incorrect block length", requiring me to boot up from my install disk and repair the drive.
    Is this maybe a bug? Is there something I might be doing wrong? Could an extension like AdBlock be messing up my downloads?

    It seems that FireFox leaves those partial download files if for any reason they get interrupted. It's possible to resume the download through various uninteresting means, but if you're like me, it gets filled up with files that I intentionally did not complete downloading.
    If you're terminal-savvy, you can set up a script that cleans up old .part files. Here's what I've set in my crontab:
    0 * * * * /usr/bin/find ~/Downloads/*.part -atime +1 -exec rm {} \; &> /dev/null
    It will delete any files in my downloads folder that are at least 1 day old.
    To install this in your crontab, launch terminal and type "crontab -e"
    This will bring up a text editor, probably vi. You'll see a bunch of ~'s down the left side. Type "i" to go into "insert" mode. The bottom left will say "-- INSERT --"
    Copy and paste (or type) the line of code I have above.
    Hit enter just to make sure you have a newline at the end.
    Hit "Escape" to exit the insert mode.
    Hit Shift-Z Shift-Z (that's Shift-Z twice) to exit the editor.
    You should see a status message "crontab: installing new crontab"
    If you type "crontab -l" you should see your newly installed crontab.
    At the top of the next hour, any .part files that are more than a day old should be deleted, and this should continue forever.

  • Time machine not deleting old backups...

    I am on Mavericks 10.9.1 and get the following error:
    "The backup disk needs48.93 GB for the backup but only 30.99 are available.  Select a larger backup disk or make the backup smalled by excluding files."
    I recently had to unplug my external HD which I use for time machine back-ups, this error started when I plugged it back in just a few days ago.  I have exlcuded some files from the back up and still get the error.  My internal HD has 475.62GB of data on it, and I am trying to back up to a 500GB external HD, the total size of my backup is roughly 465GB. 
    Seems like I should have enough space for a back-up and TM should delete the old back-ups.  I have been through a search of the forum and online and have not found a solution.  Has anyone ran into this?
    Thanks for the help!

    I believe I was told that If you had older backups like ML and your disk is getting full it will not delete these because you are now backing up a new OS (Mavericks).  It only deletes older backups of the same OS you are now using.

  • CUCM 8.6.2 Not Deleteing Old Backups

    Have set "Number of backups to store on Network Directory" to 1
    backup user has permissions to delete (tested with sftp client)
    but backup still keeps old backups.
    thanks

    Hi
    You'll need to review the logs either on CUCM (DRF logs) or on the SFTP server. I'd start with the SFTP server, try to see what requests are failing or if CUCM is not requesting that the files be deleted at all.
    Aaron

  • Backup disk is full ... Time Machine not deleting old backups

    In my Time Machine preferences it says "The older backups are deleted when your disk becomes full." Well ... my disk is full but Time Machine is not deleting its old backups to make more room.
    So now TM is failing to backup.
    Any suggestions for freeing up some disk space and getting back to getting backed up?
    Thanks.
    Ramone

    ramonekalsaw wrote:
    In my Time Machine preferences it says "The older backups are deleted when your disk becomes full." Well ... my disk is full but Time Machine is not deleting its old backups to make more room.
    So now TM is failing to backup.
    What message does it send? See #C2 in [Time Machine - Troubleshooting|http://web.me.com/pondini/Time_Machine/Troubleshooting.html] (or use the link in *User Tips* at the top of this forum).
    It will show you how to locate the message(s) that describe the problem, then help you fix it. If that doesn't help, post back with details, including all the messages, your setup (especially the destination for the backups), what you've done, and the results.
    Any suggestions for freeing up some disk space and getting back to getting backed up?
    Do you have other data on the disk, in the same partition? If so, that's not a good idea, and may be the source of the problem. See #3 in [Time Machine - Frequently Asked Questions|http://web.me.com/pondini/Time_Machine/FAQ.html] (or use the link in *User Tips* at the top of this forum).

  • Time machine not deleting old backups of recovery partition

    I have a Mac Mini running Lion Server. I have an external disk partitioned with a space for network backups and a smaller partition for backing up the server itself. The server has a 160GB disk, it is only using 29.27GB, the partition for backing up the server is 152GB (it's what was left over after creating the partition for the network backups). I figured since I'm only using about 30GB, 152GB should be plenty of space. However after 3 months of use I get the error "the backup is too large for the backup disk". In the past I have formatted the partition and restarted the backups, however it always fills up after 3 months. This time I decided to dig into it a bit more. I looked to see what was available in my backup, it only has one previous restore point. I browsed the disk and opened the backups.backupdb folder, checked the size of the folder with the computer name, it is only 9.44GB. I was wondering where all of the space went so I enabled hidden files, I found the .RecoverySets folder and found it was taking up 141.95GB. I looked at the recovery sets, there are 295 copies of com.apple.recovery.boot which all seem to contain the following files:
    .disk_label                         749b
    BaseSystem.chunklist       2KB
    BaseSystem.dmg              454.6MB
    boot.efi                              864KB
    com.apple.Boot.plist          431b
    kernelcache                       24.1MB
    PlatformSupport.plist         2KB
    SystemVersion.plist           478b
    Of those files, the only file not dated Aug 11, Oct 6 or 12, 2011 is com.apple.Boot.plist which has a date that corresponds to when the backup was performed. These backups go all the way back to Jan 30, the last time I formatted the partition, but the user data backups only go back to the 27th and it hasn't been able to complete a backup since.
    I thought Time Machine was supposed to only backup data that had changed since the last backup, and delete old revisions when space is running low, it seems that it is copying more than just the data that changed since the last backup and only deleting old revisions of user data, not system data. Is there a way to fix this permanently?

    See C18 in the first linked article. Also, your backup drive should be 2-4 times your hard drive capacity.
    Time Machine Troubleshooting
    Time Machine Troubleshooting Problems

  • Time Capsule not deleting old backups when full

    I have a number of drives attached for alternating backups through Time Machine. When a generic USB drive I have gets full, it sends out a message saying that it will have to delete the oldest BU, which is fine by me. My relatively new tall Time Capsule just tells me to reduce the number of files I'm backing up or get another drive.
    Also, form the numbers in the screenshot, it looks like it's trying to do a complete backup of my iMac drive when it should just be incremental, as it has been doing all along. Using 10.10.1 on a 2-year old iMac.
    Any ideas why? Thanks to all in advance.

    Incremetnal backups are small, so Time Machine usually does not have any trouble deleting a few of oldest incremental backups to make room for new small incremental backups.....but....450 GB is not an incremental backup, and Time Machine will not be able to delete enough data to make room for the large backup that it is being asked to complete.
    If you want to keep all of the data on the current Time Capsule, you can add another USB drive to the Time Capsule, or another Time Capsule for that matter and continue backups that way.
    Another option....the least expensive.....would be to erase the current Time Capsule drive and start over again with a new backup set.

Maybe you are looking for

  • Short Dump in VF01 while creating debit memo

    Hi, we are trying to create the debit memo in tcode VF01,while saving the doc it is giving dump. i went to  ST22 for error analysis,details are "COMMIT_IN_POSTING" error in FM RV_INVOICE_REFRESH. Short text     Invalid COMMIT WORK in an update functi

  • Download an existing site

    All the tutorials I have found have dealt with creating new sites and publishing them. I have a site already on the internet that I want to work on with DW. I have been unsuccessful at importing it using DW and it won't synchronize with the existing

  • Windows Server 2003 AD Migration Problem

    Hi Team, I'm currently working on a project on Migrating our Windows Server 2003 AD server (old Machine) to our new Windows Server 2003 machine (PDC-AD). I successfully promoted our new AD server (PDC-AD) as domain controller, but upon checking, the

  • 8110 reboots halfway through the App Loader's OS restore

    My 2-year-old 8110 has still got a PIN, can be seen from the Desktop Manager and AppLoader, and can even start receiving the OS restore...however, at random points during the upload, it reboots itself and so the AppLoader can't complete its final tas

  • LR6 supports CMYK, kind of

    LR6's print module now supports CMYK output profiles, awesome. I'd prefer a TIFF over a JPEG but this is a good start. But CMYK profiles cannot be accessed in the Export module, just RGB. That seems rather odd.