Home > Domino Tips > Administrator > Mail > Creating replica stubs
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

MAIL

Creating replica stubs


Don Bechtold
04.13.2004
Rating: -3.33- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Creating replica stubs is a good way to distribute small files via your mail system.

For example: A company directory that is 100 MB needs to be distributed to a widespread sales force, many of whom are using dial-up access. They need the files on their machines so that information can be accessed from anywhere without going online. If you try to send an entire database to people who are using dial-up to access their Notes servers, it will take them hours to get a single mail message.

If you send a replica stub, which is 100 KB, they get the message very quickly, download the replica stub to their hard drives, and start replicating in minutes. The replication may take hours, but it can be done in the background without freezing users' machines. As the replication continues, they will have partial data until it is completed, but can still use their machines while the data transfer is continuing.

Use this agent to create as many replica stubs as you want. Just set your naming convention and the number, and your stubs are created.

Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase 
'original database
Dim dbr As NotesDatabase 
'new replica stub
Dim nr As NotesReplication 
'original replication info
Dim nrr As NotesReplication 
'replica db replication info

Set db = s.CurrentDatabase
Set nr = db.ReplicationInfo 
'get source replication settings
nr.Disabled = True 'temporarily 
turn off replication
nr.Save 'save replication settings

For i% = 1 To 10 'filename attempt
'new replicas will be i% + original db name
'set your own naming conventions here
'CAUTION - delete previous databases 
with same filename
'allows for debugging runs - 
probably get rid of in production
Set dbr = New NotesDatabase("", Cstr(i%) &
db.FileName)
If dbr.IsOpen Then 
dbr.Remove
End If

' now create the replica - since replication 
is disabled, you just get a stub
Set dbr = db.CreateReplica("", Cstr(i%)
& db.FileName)

'now turn on replication for new replica stub
Set nrr = dbr.ReplicationInfo
nrr.Disabled = False
nrr.save
Next

'turn back on replication for the original
nr.Disabled = False
nr.save
End Sub

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip library by member Don Bechtold. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Mail
Run or restart Notes/Domino agents via text messages
How to create mail files using a LotusScript agent
How to turn off the message recall feature in Lotus Notes 8
Domino server setting and email policy tricks admins must know
Top 10 Lotus Notes/Domino administration tips of 2008
Understanding a Lotus Notes Smart Upgrade rollout
Bringing MailRule documents back into view
Use SMTP outbound authentication to relay hosts in Lotus Notes Domino 8
Notes/Domino 6 version of 'Discover Folder'
Five tips to improve email performance

Lotus Notes Domino Agents
How the Agent Profiler tool improves Notes/Domino performance
Run or restart Notes/Domino agents via text messages
Calculating results for a column in a Lotus Notes view
Approve Lotus Notes documents using a BlackBerry mobile device
LotusScript agent indexes Lotus Notes/Domino databases
Top 10 Lotus Notes/Domino coding and development tips of 2008
Open documents in Lotus Notes from the Web without a UNID
Fix and update Lotus Notes documents with limited access
Verify scheduled agent status with Domino Extensible Language (DXL)
Top 10 Lotus Notes Domino programming and development tips of 2007

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts