+ Post New Thread
Results 1 to 3 of 3
Coding Thread, Backup checking script... in Coding and Web Development; Hay all. There is a scheduled task in place that makes a back up of the SIMS and FMS databases. ...
  1. #1
    Guest

    Join Date
    Jun 2009
    Posts
    3,754
    Thank Post
    1,458
    Thanked 493 Times in 376 Posts
    Rep Power
    0

    Backup checking script...

    Hay all.

    There is a scheduled task in place that makes a back up of the SIMS and FMS databases. I am looking to get a script together that checks to see if the backup was successful.

    The backs are compressed into a zip file. I was thinking that the script could check to see if there are 2 zip files in the backups directory with today's date? The backups are given a specific name with the date in the file name.

    Preferably, a batch or VBS file would be ideal for this.

    Would this be a good way to do this? Any suggestions would be appreciated.

  2. #2
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    5,007
    Thank Post
    124
    Thanked 286 Times in 263 Posts
    Rep Power
    109
    It would be fairly straight forward using VBS all you would need would be a line of code that checked the number of files in a folder and that folder name would be variable according to the date.

    Something like

    Code:
    objFolder = "c:\MyBasePath\" + date
    Code:
    Set objFso = Createobject( "Scripting.FileSystemObject" )
    Set objFolder = objFso.GetFolder(strFolder)
    If( Err.Number <> 0 ) Then
    Exit Function
    End If
    n = objFolder.files.count
    if n = 2 then
    'alert code here
    end if

    Thats off the top of my head and a quick paste from google. You should make it check the file types as well.

  3. #3

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    10,053
    Thank Post
    3,583
    Thanked 1,123 Times in 1,025 Posts
    Rep Power
    377
    Quote Originally Posted by Rawns View Post
    Hay all.

    There is a scheduled task in place that makes a back up of the SIMS and FMS databases. I am looking to get a script together that checks to see if the backup was successful.

    The backs are compressed into a zip file. I was thinking that the script could check to see if there are 2 zip files in the backups directory with today's date? The backups are given a specific name with the date in the file name.

    Preferably, a batch or VBS file would be ideal for this.

    Would this be a good way to do this? Any suggestions would be appreciated.
    In your opinion or even after doing some RTFM'ing what do you think would be the best way to check this ?

    Once you know post back with how you would do this and one of us can see if we can help.



SHARE:
+ Post New Thread

Similar Threads

  1. A moodle on linux backup script
    By reggiep in forum Virtual Learning Platforms
    Replies: 12
    Last Post: 10th May 2011, 10:38 PM
  2. Help with Backup Script
    By soze in forum Scripts
    Replies: 5
    Last Post: 18th June 2008, 01:12 AM
  3. Backup PenDrive Script
    By SimpleSi in forum Scripts
    Replies: 9
    Last Post: 18th January 2007, 03:45 PM
  4. Backup Perl Script
    By ranj in forum Scripts
    Replies: 1
    Last Post: 30th April 2006, 09:02 PM
  5. Backup Script for NT backup and Robocopy
    By ChrisH in forum Scripts
    Replies: 12
    Last Post: 20th October 2005, 02:01 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
  •