WebDNA module - Automated database archiving

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 12999
interpreted = N
texte = Dear WebCatalog Users,Hi, it's me, Ken ... :)I have been frustrated with the need to always remember to duplicate my database files on a daily basis for archiving purposes, so I wrote a custom WebDNA module to take care of this for me. It works reliably and automatically.This is a drop-in module for WebCatalog 2.0 Macintosh. I doubt that it will work on NT because I don't even know if NT has something like Macintosh aliases or not. This module uses aliases - so NT users are probably out of luck.Anyways, the purpose of this module is to archive all the WebCatalog database files on your site, once a day, every day - automatically. It works by duplicating your database files and naming the duplicates with the current date prepended to the file names.If you use this module you will always have a copy of the database files that were in use on that day in the history of your web site.This module does NOT overwrite any existing archive files. Therefore, will take more and more of your disk space as time goes on... unless you move your archives to another drive once in a while - which is a good idea anyways, right? :) Installation is simple:1- Put the Archives folder into the WebSTAR root folder. 2- Put an alias of each database you want to archive inside another special folder. Make sure these aliases have exactly the same names as the database files they refer to. 3-Type a special include tag into one or more of the WebCatalog templates on your site. How it works:Everything is automatic. The first time a WebCatalog template (with the include tag) is requested on any particular day, all the databases you've aliased will be archived and named like this: 970813-users.db.The file name begins with the date - in year/month/day (yymmdd) format - so the file shows up in the Mac's list views by date even when you sort by name or kind, and so all the archives for one day are grouped together in list views.Archiving occurs the very first time WebCatalog sees your special include tag ever day. From then on, nothing happens again until the first time it sees the include tag the following day.This WebDNA slows down the delivery of the first page of the day, but that's because the MacOS has to duplicate all your database files at the same time - which takes a few seconds. This is not a concern for me because it only happens once per day, and it probably happens shortly after midnight when some non-local user is checking out my site while I'm sleeping.After the databases are archived once each day, there's no slowdown in speed when serving subsequent templates, no matter how many times templates with the special include tag are requested. I wrote the WebDNA this way to make sure WebCatalog performs as fast as always (except for that once per day exception). Another option:If you don't want to save daily copies of your database files for historical reference, but you'd like to automate the creation of a single copy of all your database files for backups, that's a different task. I created a different module to do that, too. Why I'm asking $10 for these modules:I've I spent HOURS working on these archiving modules. I ran into some problems that were not obvious to me in the beginning, so they probably won't be obvious to many other people, either. But now I've got it working the way it is *supposed* to work, and it's a great little feature to add to a WebCat site, not only for database archiving, but for peace of mind as well.Rather than seeing you 'reinvent the wheel' to create this functionality for yourself, I thought that by offering these modules for a price as low as $10, I might actually be able to earn a few dollars while saving you some time. Besides, I need money for rent next month ... :)Sincerely, Ken Grome WebDNA Solutions http://www.hui.net/dna/webdna.html Associated Messages, from the most recent to the oldest:

    
  1. WebDNA module - Automated database archiving (Kenneth Grome 1997)
Dear WebCatalog Users,Hi, it's me, Ken ... :)I have been frustrated with the need to always remember to duplicate my database files on a daily basis for archiving purposes, so I wrote a custom WebDNA module to take care of this for me. It works reliably and automatically.This is a drop-in module for WebCatalog 2.0 Macintosh. I doubt that it will work on NT because I don't even know if NT has something like Macintosh aliases or not. This module uses aliases - so NT users are probably out of luck.Anyways, the purpose of this module is to archive all the WebCatalog database files on your site, once a day, every day - automatically. It works by duplicating your database files and naming the duplicates with the current date prepended to the file names.If you use this module you will always have a copy of the database files that were in use on that day in the history of your web site.This module does NOT overwrite any existing archive files. Therefore, will take more and more of your disk space as time goes on... unless you move your archives to another drive once in a while - which is a good idea anyways, right? :) Installation is simple:1- Put the Archives folder into the WebSTAR root folder. 2- Put an alias of each database you want to archive inside another special folder. Make sure these aliases have exactly the same names as the database files they refer to. 3-Type a special include tag into one or more of the WebCatalog templates on your site. How it works:Everything is automatic. The first time a WebCatalog template (with the include tag) is requested on any particular day, all the databases you've aliased will be archived and named like this: 970813-users.db.The file name begins with the date - in year/month/day (yymmdd) format - so the file shows up in the Mac's list views by date even when you sort by name or kind, and so all the archives for one day are grouped together in list views.Archiving occurs the very first time WebCatalog sees your special include tag ever day. From then on, nothing happens again until the first time it sees the include tag the following day.This WebDNA slows down the delivery of the first page of the day, but that's because the MacOS has to duplicate all your database files at the same time - which takes a few seconds. This is not a concern for me because it only happens once per day, and it probably happens shortly after midnight when some non-local user is checking out my site while I'm sleeping.After the databases are archived once each day, there's no slowdown in speed when serving subsequent templates, no matter how many times templates with the special include tag are requested. I wrote the WebDNA this way to make sure WebCatalog performs as fast as always (except for that once per day exception). Another option:If you don't want to save daily copies of your database files for historical reference, but you'd like to automate the creation of a single copy of all your database files for backups, that's a different task. I created a different module to do that, too. Why I'm asking $10 for these modules:I've I spent HOURS working on these archiving modules. I ran into some problems that were not obvious to me in the beginning, so they probably won't be obvious to many other people, either. But now I've got it working the way it is *supposed* to work, and it's a great little feature to add to a WebCat site, not only for database archiving, but for peace of mind as well.Rather than seeing you 'reinvent the wheel' to create this functionality for yourself, I thought that by offering these modules for a price as low as $10, I might actually be able to earn a few dollars while saving you some time. Besides, I need money for rent next month ... :)Sincerely, Ken Grome WebDNA Solutions http://www.hui.net/dna/webdna.html Kenneth Grome

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

WebCatalog and barcodes (2000) Shopping Cart variation... (1997) Where is f2? (1997) The word TYPE in search contexts and fields (1998) SETCOOKIE Problems (2003) OPEN MARKET PATENTS SOUND ECOMMERCE ALARM (1998) Multiple fields on 1 input (1997) WebCatalog 4.0.1 has been released! OSXS (2000) [WebDNA] High-profile WebDNA sites? (2008) Locking up with WebCatalog... (1997) textarea (2000) Bad File: DeleteCommand.html (1998) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) [WebDNA] Silly question (2009) WebMerchant 1.6 and https (1997) [WebDNA] math variables bug in OSX 7.0 / 7.1 (2012) unique ID (1997) WebCat2b13MacPlugIn - more [date] problems (1997) Email Obfuscation Function (2008) Running _every_ page through WebCat ? (1997)