[thelist] OT: Online Backup Solutions?
Maximillian Schwanekamp
lists at neptunewebworks.com
Sun Feb 6 13:53:19 CST 2005
Bob Haroche wrote:
> So...I'm looking at an online backup solution, where we
> designate what to backup and when and have the backup/upload occur
> automatically to the remote server at a scheduled time. The idea is that I
> set this up for her and she never thinks about it. (Obviously, she'll need
> help if she ever needs to restore).
If you want to minimize cost, WebDrive[0] + a basic hosting account + MS
Robocopy[1] (or other backup app) could work. WebDrive is an
inexpensive app ($50; Win only) to allow easy mapping of an S/FTP server
as a local drive. Obviously, she'd need a web host account somewhere to
put the backup data. MS Robocopy is a command-line app to copy files.
You can create a batch file with the directories to copy, and set it to
run nightly. I use it (with just an external HD, not webdrive) mostly
in "mirror" mode, so that my backup directories exactly reflect my
source dirs. The options are fairly flexible, it's quite simple to
implement. The only downside to this setup is that your client would
need to come to you to change the setup. You might just use a more
advanced backup solution, using WebDrive as the mechanism to allow uploads.
Last thing though - why not just an external harddrive and use something
Norton Ghost? I picked up an 80GB one for about $100 [3], but larger
drives are not terribly expensive.
[0] http://webdrive.com/
[1] http://url123.com/cn6b4
[3] http://url123.com/cu2hd
<tip type="Smarty PHP Templates - Caching per session" author="Max
Schwanekamp">
One of the more compelling reasons to use Smarty is its very flexible
caching mechanism. You can not only set a cache lifetime when invoking
a Smarty template object, but you can do so on a per-template basis. If
you have for example, a masthead that rarely changes, you can set its
cache quite long (hours), while not caching the content of the page.
Many sites/web apps have options (presentational and/or functional) that
change per user, often according to their profile record. Caching can
be used per-user by using Smarty's Cache Grouping feature[0] and a user
session_id (either a PHP session_id or some other user id). To do this:
When the user logs in, record their session_id to the database, e.g. in
a user_sessions table; or you might even set your DB as the actual
session_handler.[1]
[code]
$tpl =& new Smarty;
$tpl->caching = true;
$tpl->cache_lifetime = 3600; // 1 hour
$navigation = $tpl->fetch('navigation.tpl',"user|".session_id()."|nav");
[/code]
When your user changes their preferences, be sure to clear the cache for
their session:
[code]
$user->save_new_preferences();
$tpl->clear_cache(null,"user|".session_id());
[/code]
This is esp useful for elements which only change according to user
preferences, but can also be used to speed up things like search results
by caching the results page.
[0] http://smarty.php.net/manual/en/caching.groups.php
[1] http://us4.php.net/manual/en/function.session-set-save-handler.php
</tip>
--
Maximillian Von Schwanekamp
http://www.neptunewebworks.com/
More information about the thelist
mailing list