+ Post New Thread
Page 3 of 4 FirstFirst 1234 LastLast
Results 31 to 45 of 50
MIS Systems Thread, SIMS Tidy Backups - SQL 2008 - Autumn release in Technical; I've downloaded your latest Tidybackups.exe from Sourceforge and I'm testing it out on a test enviroment on which I've set ...
  1. #31
    Guest

    Join Date
    Jun 2009
    Posts
    3,754
    Thank Post
    1,458
    Thanked 489 Times in 375 Posts
    Rep Power
    0
    I've downloaded your latest Tidybackups.exe from Sourceforge and I'm testing it out on a test enviroment on which I've set up a batch file to backup SIMS and FMS with dbAttach.exe in the usual manner and then run the following command at the end:

    "tidybackups.exe" /PATH:"C:\Backup" /DAYS:5 /ZIP

    I had a couple of BAK's and ZIP files and it seems to have deleted every previous backup apart from one sims and fms backup, and the new BAK files get deleted before they even get compressed! Ideas?

    The full script just in case:

    Code:
    @ECHO off
    
    PushD %~dp0
    
    SET SIMSDrive=C:
    SET SQL=\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL
    
    ECHO SIMSDrive=%SIMSDrive%
    
    ECHO Backing up SIMS
    "%SIMSDrive%\%SQL%\Binn\dbattach.exe" /BACKUP /AUTO /SERVER=%COMPUTERNAME%\SIMS2008 /DATABASE=SIMS /USER=sa /PASSWORD=******
    
    ECHO Backing up FMS
    "%SIMSDrive%\%SQL%\Binn\FMSSQL\dbattach.exe" /BACKUP /AUTO /SERVER=%COMPUTERNAME%\SIMS2008 /DATABASE=ccsfms /USER=sa /PASSWORD=******
    
    ECHO Tidying
    "tidybackups.exe" /PATH:"%SIMSDrive%\%SQL%\Backup" /DAYS:5 /ZIP
    
    ECHO Done
    Last edited by Rawns; 28th January 2011 at 04:09 PM.

  2. #32

    vikpaw's Avatar
    Join Date
    Sep 2006
    Location
    Saudi Arabia
    Posts
    5,848
    Thank Post
    671
    Thanked 1,383 Times in 1,145 Posts
    Rep Power
    350
    @rawns @matt40k - are you getting that de-ja-vu feeling, again?! I know i am.

    Are you sure you're not running the old version, that did this to you last time?

  3. #33
    Cools's Avatar
    Join Date
    Jan 2009
    Location
    Bedfordshire
    Posts
    498
    Thank Post
    24
    Thanked 62 Times in 57 Posts
    Rep Power
    25
    i use forfiles

    forfiles -p "C:\what\ever" -s -m *.* -d -<number of days> -c "cmd /c del @path"
    See forfiles /? for details

    If you don't have forfiles installed by default on your machine, get it from Microsoft FTP server. Place it to C:\WINDOWS\system32\forfiles.exe
    Last edited by Cools; 29th January 2011 at 12:22 AM.

  4. #34
    Guest

    Join Date
    Jun 2009
    Posts
    3,754
    Thank Post
    1,458
    Thanked 489 Times in 375 Posts
    Rep Power
    0
    Quote Originally Posted by vikpaw View Post
    @rawns @matt40k - are you getting that de-ja-vu feeling, again?! I know i am.

    Are you sure you're not running the old version, that did this to you last time?
    I'm sure! I double checked before posting!

    I'm trailing the latest version downloaded from SourceForge dated 22-10-2010 (Version 1.4.12.38).
    Last edited by Rawns; 31st January 2011 at 09:59 AM.

  5. #35

    vikpaw's Avatar
    Join Date
    Sep 2006
    Location
    Saudi Arabia
    Posts
    5,848
    Thank Post
    671
    Thanked 1,383 Times in 1,145 Posts
    Rep Power
    350
    Quote Originally Posted by Rawns View Post
    I'm sure! I double checked before posting!

    I'm trailing the latest version downloaded from SourceForge dated 22-10-2010 (Version 1.4.12.38).
    Maybe the version control got borked! I just found myself taken off the staff emergency phone list because somebody updated a 4 year old file! That's probably why i was working all weekend, while everyone else ended up at the beach

  6. #36

    matt40k's Avatar
    Join Date
    Jun 2008
    Location
    Ipswich
    Posts
    4,387
    Thank Post
    368
    Thanked 637 Times in 519 Posts
    Rep Power
    158
    What's the creation date on the zips? You also might want to look at the preserve option.

  7. Thanks to matt40k from:

    Rawns (10th February 2011)

  8. #37
    Guest

    Join Date
    Jun 2009
    Posts
    3,754
    Thank Post
    1,458
    Thanked 489 Times in 375 Posts
    Rep Power
    0
    Quote Originally Posted by matt40k View Post
    What's the creation date on the zips? You also might want to look at the preserve option.
    Thanks Matt. Added a preserver tag and it is compressing, then deleting.

    I think I may not fully understand what preserve does though. My command is this:

    Code:
     "tidybackups.exe" /PATH:"C:\%SQL_DIR%\Backup" /DAYS:5 /ZIP /LOG /PRESERVE:5
    I assume that this should keep only the 5 latest compressed backup files and delete any older? I've been running it as a scheduled task daily on my test environment and I have 10 backups for both SIMS and FMS?

  9. #38

    matt40k's Avatar
    Join Date
    Jun 2008
    Location
    Ipswich
    Posts
    4,387
    Thank Post
    368
    Thanked 637 Times in 519 Posts
    Rep Power
    158
    Hang on, was about to say add /debug, but just noticed I haven't add the timestamp to the output (doh!!)

  10. #39

    matt40k's Avatar
    Join Date
    Jun 2008
    Location
    Ipswich
    Posts
    4,387
    Thank Post
    368
    Thanked 637 Times in 519 Posts
    Rep Power
    158
    @Rawns

    Can you download: Download tidybackups from SourceForge.net, then add /debug to command and upload the log.

  11. Thanks to matt40k from:

    Rawns (10th February 2011)

  12. #40
    Guest

    Join Date
    Jun 2009
    Posts
    3,754
    Thank Post
    1,458
    Thanked 489 Times in 375 Posts
    Rep Power
    0
    The log lies. It says the 2 new backups have been compressed but they have not been...


    10/02/2011 10:20:32 - Tidy Backups Utility - 1.4.13.39
    10/02/2011 10:20:32 - Admin: True
    10/02/2011 10:20:32 - OS Version: Microsoft Windows NT 5.1.2600 Service Pack 3
    10/02/2011 10:20:32 - Disc letter: C:
    10/02/2011 10:20:32 - Disc label: Local Disk
    10/02/2011 10:20:32 - Disc format: NTFS
    10/02/2011 10:20:32 - Local disc: True
    10/02/2011 10:20:32 - Disc type: Fixed
    10/02/2011 10:20:32 - Disc ready: True
    10/02/2011 10:20:32 - Disc size: 149934 MB
    10/02/2011 10:20:32 - Free space: 79259 MB
    10/02/2011 10:20:32 - Username: prawnsley
    10/02/2011 10:20:32 - Domain: SOMERSET
    10/02/2011 10:20:32 - Arguments: /PATH:C:\\PROGRAM FILES\MICROSOFT SQL SERVER\MSSQL10.SIMS2008\MSSQL\BACKUP /DAYS:5 /ZIP /PRESERVE:5 /LOG /DEBUG
    10/02/2011 10:20:32 - Days: 5
    10/02/2011 10:20:32 - Path: C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup
    10/02/2011 10:20:32 - C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\ccsfms_cp693_ mnw_20110201_093800.zip - 01/02/2011 09:37:32
    10/02/2011 10:20:32 - C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\ccsfms_cp693_ mnw_20110201_180300.zip - 01/02/2011 18:02:49
    10/02/2011 10:20:32 - C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\ccsfms_cp693_ mnw_20110202_180300.zip - 02/02/2011 18:02:43
    10/02/2011 10:20:32 - C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\ccsfms_cp693_ mnw_20110203_180300.zip - 03/02/2011 18:02:50
    10/02/2011 10:20:32 - C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\ccsfms_cp693_ mnw_20110207_180400.zip - 07/02/2011 18:04:10
    10/02/2011 10:20:32 - C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\ccsfms_cp693_ mnw_20110208_180300.zip - 08/02/2011 18:02:41
    10/02/2011 10:20:32 - C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\ccsfms_cp693_ mnw_20110209_180300.zip - 09/02/2011 18:03:17
    10/02/2011 10:20:32 - C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\ccsfms_cp693_ mnw_20110210_090700.zip - 10/02/2011 09:07:28
    10/02/2011 10:20:32 - C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\ccsfms_cp693_ mnw_20110210_102000.bak - 10/02/2011 10:20:15
    10/02/2011 10:20:32 - C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\sims_cp361_mn w_20110201_093500.zip - 01/02/2011 09:34:38
    10/02/2011 10:20:32 - C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\sims_cp361_mn w_20110201_180000.zip - 01/02/2011 18:00:03
    10/02/2011 10:20:32 - C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\sims_cp361_mn w_20110202_180000.zip - 02/02/2011 18:00:02
    10/02/2011 10:20:32 - C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\sims_cp361_mn w_20110203_180000.zip - 03/02/2011 18:00:03
    10/02/2011 10:20:32 - C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\sims_cp361_mn w_20110207_180000.zip - 07/02/2011 18:00:15
    10/02/2011 10:20:32 - C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\sims_cp361_mn w_20110208_180000.zip - 08/02/2011 18:00:02
    10/02/2011 10:20:32 - C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\sims_cp361_mn w_20110209_180000.zip - 09/02/2011 18:00:05
    10/02/2011 10:20:32 - C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\sims_cp361_mn w_20110210_090500.zip - 10/02/2011 09:04:43
    10/02/2011 10:20:32 - C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\sims_cp361_mn w_20110210_101700.bak - 10/02/2011 10:17:04
    10/02/2011 10:20:32 - Path permission: Full Control
    10/02/2011 10:20:32 - Preserve: 5
    10/02/2011 10:20:32 - Safe: False
    10/02/2011 10:20:32 - Archive: True
    10/02/2011 10:20:32 - Log: True
    10/02/2011 10:20:32 - Log path: C:\Documents and Settings\prawnsley\Desktop\Test Backup\tidybackups_log.txt
    10/02/2011 10:20:32 - Log permission: Full Control
    10/02/2011 10:20:32 - Beginning
    10/02/2011 10:20:32 - PRESERVED: C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\sims_cp361_mn w_20110210_101700.bak
    10/02/2011 10:20:32 - PRESERVED: C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\sims_cp361_mn w_20110210_090500.zip
    10/02/2011 10:20:32 - PRESERVED: C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\sims_cp361_mn w_20110209_180000.zip
    10/02/2011 10:20:32 - PRESERVED: C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\sims_cp361_mn w_20110208_180000.zip
    10/02/2011 10:20:32 - PRESERVED: C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\sims_cp361_mn w_20110207_180000.zip
    10/02/2011 10:20:32 - PRESERVED: C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\ccsfms_cp693_ mnw_20110210_102000.bak
    10/02/2011 10:20:32 - PRESERVED: C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\ccsfms_cp693_ mnw_20110210_090700.zip
    10/02/2011 10:20:32 - PRESERVED: C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\ccsfms_cp693_ mnw_20110209_180300.zip
    10/02/2011 10:20:32 - PRESERVED: C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\ccsfms_cp693_ mnw_20110208_180300.zip
    10/02/2011 10:20:32 - PRESERVED: C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\ccsfms_cp693_ mnw_20110207_180400.zip
    10/02/2011 10:20:32 - COMPRESSED: C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\ccsfms_cp693_ mnw_20110210_102000.bak
    10/02/2011 10:20:32 - DELETED: C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\ccsfms_cp693_ mnw_20110210_102000.bak
    10/02/2011 10:20:32 - COMPRESSED: C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\sims_cp361_mn w_20110210_101700.bak
    10/02/2011 10:20:32 - DELETED: C:\\Program Files\Microsoft SQL Server\MSSQL10.SIMS2008\MSSQL\Backup\sims_cp361_mn w_20110210_101700.bak
    10/02/2011 10:20:32 - Finishing
    Attached Files Attached Files

  13. #41

    matt40k's Avatar
    Join Date
    Jun 2008
    Location
    Ipswich
    Posts
    4,387
    Thank Post
    368
    Thanked 637 Times in 519 Posts
    Rep Power
    158
    If you use the /debug, it'll just output what it SHOULD do. If you run it again it, but without the debug, it should now compress\delete them.

  14. #42
    Guest

    Join Date
    Jun 2009
    Posts
    3,754
    Thank Post
    1,458
    Thanked 489 Times in 375 Posts
    Rep Power
    0
    Ahh, I see.

    From the preserve, I can see it's keeping the latest 5 SIMS and FMS backups, but still don't understand why it's not deleting the older backups.

  15. #43

    vikpaw's Avatar
    Join Date
    Sep 2006
    Location
    Saudi Arabia
    Posts
    5,848
    Thank Post
    671
    Thanked 1,383 Times in 1,145 Posts
    Rep Power
    350
    Is it keeping 5 days and preserving 5 beyond that?? So you get 10. Not sure i see how it works.
    Is it working on the date + time, so if you took an interim backup mid day, where would that figure in the safelist? I noticed some of Rawns backups are from the same day.

  16. #44
    Guest

    Join Date
    Jun 2009
    Posts
    3,754
    Thank Post
    1,458
    Thanked 489 Times in 375 Posts
    Rep Power
    0
    Just tested with a DAYS:4 and PRESERVE:1 command.

    It's has now deleted a number of backups and I now have 5 backups of SIMS and 5 backups of FMS data - BUT its deleted the newest backups and kept the five oldest ones!
    Last edited by Rawns; 10th February 2011 at 11:44 AM.

  17. #45

    vikpaw's Avatar
    Join Date
    Sep 2006
    Location
    Saudi Arabia
    Posts
    5,848
    Thank Post
    671
    Thanked 1,383 Times in 1,145 Posts
    Rep Power
    350
    I hope you made a backup!
    Maybe you needed DAYS:1 and Preserve:4, or perhaps, not DAYS at all just preserve...
    Could do with some "/?" docs i guess.

SHARE:
+ Post New Thread
Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. [SIMS] SIMS 2010 Autumn Pre-Release Note
    By matt40k in forum MIS Systems
    Replies: 8
    Last Post: 28th September 2010, 09:06 PM
  2. Move to SQL 2008 and backups
    By thesthelensman in forum MIS Systems
    Replies: 2
    Last Post: 13th April 2010, 02:16 PM
  3. SIMS Autumn 09 Release - Experiences?
    By pete in forum MIS Systems
    Replies: 35
    Last Post: 26th December 2009, 02:34 PM
  4. SIMS.net Autumn release - Options 5.7
    By localzuk in forum MIS Systems
    Replies: 0
    Last Post: 1st December 2009, 03:37 PM
  5. Error Doing Tidy Backups in Sims.Net
    By tech_guy in forum MIS Systems
    Replies: 0
    Last Post: 7th January 2008, 01:58 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •