Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Backup Archiveable items

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,48704
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Backup Archiveable items
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Backup Archiveable items - 6/25/2007 9:23:18 AM   
  tmeers


Posts: 17
Score: 0
Joined: 11/13/2006
Status: offline
Hello all, I was hoping some one could help me out wiht this script. I'm sure it's not too hard but for the life of me I cannot figure it out. I have a backup script that runs every 2 or so days and copies about 500mb of files every time. I'm trying to change it so that it will only copy off the files/folder structure that have been changed as not that much has been changing latly it seems a waste to do all of it (even though it only takes about 90 seconds to complete).

I have been trying to do it based on the archive attribute being set but not sure how to scan it all then copy the folder structure and files. THen have it scan again and uncheck the archive attrib so next time it will not pick up that file.


      

Any help would be great,
Tim
 
 
Post #: 1
 
 RE: Backup Archiveable items - 6/26/2007 1:37:12 AM   
  ebgreen


Posts: 5037
Score: 31
Joined: 7/12/2005
Status: online
Personally I wouldn't reinvent the wheel. Use Robocopy. It's free from MS and already does justabout anything you could ever want for regular backups like this.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to tmeers)
 
 
Post #: 2
 
 RE: Backup Archiveable items - 6/26/2007 3:35:31 AM   
  tmeers


Posts: 17
Score: 0
Joined: 11/13/2006
Status: offline
Hmm I'm begining to see a trend here...any ways, is it possible for roboscript to generate the time stamped folder to copy into? That is my biggest bump in the road and really needs to be there. All this is doing to sending the folders/files to my second hard drive, then once a month I burm it all to DVD. And it is much easier to dig thru the folders if the are all at the very least datestamped.

Maybe some one could show me an example? I just dont think this could be that impossible in VBS.

Thanks for your input.
Tim

(in reply to ebgreen)
 
 
Post #: 3
 
 RE: Backup Archiveable items - 6/26/2007 3:49:27 AM   
  ebgreen


Posts: 5037
Score: 31
Joined: 7/12/2005
Status: online
Perhaps you should explain more regarding what your desired outcome is. You want to copy files to a folder named according to a date time stamp, but only copy files with the archive flag set. Is that correct?

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to tmeers)
 
 
Post #: 4
 
 RE: Backup Archiveable items - 6/26/2007 4:10:19 AM   
  tmeers


Posts: 17
Score: 0
Joined: 11/13/2006
Status: offline
Yes that is correct. As it is the script runs 3 times a week and creates the new folder for each day. I figure if it only copied the modified ones I could do it more often weather it be thru vbs or any of the above.

(in reply to ebgreen)
 
 
Post #: 5
 
 RE: Backup Archiveable items - 6/26/2007 4:28:08 AM   
  ebgreen


Posts: 5037
Score: 31
Joined: 7/12/2005
Status: online
You mentioned changed files. So the criteria is files that have the archive flag set AND have changed since the last run?

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to tmeers)
 
 
Post #: 6
 
 RE: Backup Archiveable items - 6/26/2007 4:42:54 AM   
  tmeers


Posts: 17
Score: 0
Joined: 11/13/2006
Status: offline
Well my understanding is that when you modify a file it should flip that flag to say 'Ready to be archived' correct. Otherwise how would backup software know what to backup for incremential backups. But just baseing it off of the flag is what I was looting at thinking it was the same.

Thanks
Tim

(in reply to ebgreen)
 
 
Post #: 7
 
 RE: Backup Archiveable items - 6/26/2007 5:58:54 AM   
  ebgreen


Posts: 5037
Score: 31
Joined: 7/12/2005
Status: online
No. Modifying a file does not flip the Archive flag. When backup software only backs up modified data, it simply compares the last modified date on the file to the last modified date of the same file in the last backup (it can be a little more complex depending on the software but that is the gist of it).

< Message edited by ebgreen -- 6/26/2007 6:00:40 AM >


_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to tmeers)
 
 
Post #: 8
 
 RE: Backup Archiveable items - 6/26/2007 6:35:48 AM   
  tmeers


Posts: 17
Score: 0
Joined: 11/13/2006
Status: offline
Hmm ok, well I'm still trying to solve this quandry. I know that my script is a little overkill but it has everything (ok well almost everything) I need. I really would liek to continue using it but if there is a better solution that can do everything my script is doing then I say bring it on.

Thanks for you help in this issue by the way.
Tim

(in reply to ebgreen)
 
 
Post #: 9
 
 RE: Backup Archiveable items - 6/26/2007 7:04:06 AM   
  ebgreen


Posts: 5037
Score: 31
Joined: 7/12/2005
Status: online
Well normally the way that this is done is by copying the files to the same directory every time. That way it is simple for the backup app to just compare the source files to the files that are already in the backup dir. In your case you want to compare to files that are located somewhere else altogether. In this case Robocopy will not work for what you want. If I had this problem to solve, I would do so by creating two dictionaries. The first would have the keys be the full path and file name for every file in the source dir. The value would be the last mod date for each file. The second dictionary would need to be built from a file that you have saved in the root of the previous buckup folder. The reason you need to do this is that you need to maintain data persistence between runs of your script. The file that you save every time that the script runs needs to keep a complete record for every file that you have ever backed up. That is the only way that you can know on friday that a file in source is now different from the one that you backed up on monday but didn't touch on wednesday (if that makes sense).

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to tmeers)
 
 
Post #: 10
 
 RE: Backup Archiveable items - 7/12/2007 2:36:42 AM   
  Rischip


Posts: 502
Score: 2
Joined: 3/26/2007
Status: offline
Actually modifying a file does set the archive bit.
Full backups reset the bit.(This does not include copy backups)
Differential backups do not reset the bit. (All files that have changed since last full backup are used)
Incremental backups do reset the bit. (All files that have chnaged since last incremental get backed up)

So using the Archive bit should be an adequate test.



_____________________________

Rischip
Author of - The Grim Linker

(in reply to ebgreen)
 
 
Post #: 11
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Backup Archiveable items Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts