Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Lotus Script to backup mails

Posted on 2006-04-05
10
Medium Priority
?
731 Views
Last Modified: 2013-12-18
Dear All,

Our lotus notes setup here at work does not allow the archiving to work (don't ask! Its not that we are not allowed it just does not work!) however we can use a simple command scripts to Copy documents that are more than 7 days old into a network backup database and the delete those from your main mailbox.

Using the simple commands I have done this and it works but with one problem, when a calendar entry is copied over to the backup database it removes it from my live calender and appears in the calendar for the backup mailfile. Is there a lotusscript method that will do the same as my simple actions agent but leave calender entrys and invites alone?

Many thanks,

Kev
0
Comment
Question by:kevinsmith121
  • 3
  • 3
  • 3
  • +1
10 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 16381267
Does not work??? I'm inclined to say (as SuperNanny does): "unasseptable!". What doesn't work? IMHO recreating the archive functionality that works for thousands of people is bound to fail and it will cost too much.

What systems are you on, and what versions of Notes/Domino do you use? Where did you try to create the archive, locally?

Similar questions about archiving:
    http:Q_21129164.html "Archive Failing"
    http:Q_20571664.html "Archiving A Database"
0
 
LVL 1

Author Comment

by:kevinsmith121
ID: 16381389
Oh I agree totally sjef bosman, sadly I have no control over the fact that this feature is broken, it has been that way for years.

mbonaci thankyou for the links but sadly I am an idiot and may need a little more guidence.

Does anyone have code I can copy and paste and just fill in the blanks for the mailfile names and locations?

Conditions are that I want to export from DatabaseA to DatabaseB all document older than 7 days but do not move Invitations and Calender entries.

Cheers chaps

Kev
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 22

Expert Comment

by:mbonaci
ID: 16381582
kevinsmith121,
OK, I'll help you, give me ten minutes.


Marko
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 16381699
LOL Please read the monkey-story in my EE-profile.

You must have had some Domino/Notes upgrade over those years? Full of unbroken or mended features?

Additional links, describing or containing agents:
    http:Q_20586136.html "Archive to selected date"
    http:Q_21140062.html "Archive old documents from a production database."
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 16381710
LOL Too late... ;)
0
 
LVL 1

Author Comment

by:kevinsmith121
ID: 16381835
LOL the Monkey Story is spot on!!

0
 
LVL 22

Accepted Solution

by:
mbonaci earned 2000 total points
ID: 16381975
kevinsmith121,
all this we'll do in your mail db (preferably create your own mail template and do the modifications on it. After you're done replace the design of your mail file with that template.)

First create new view called OlderThenWeek.
Selection formula:
Dat := @Adjust( @Today; 0; 0; -7; 0; 0; 0 );
Select @IsMember( Form; "Memo" : "Reply" ) & @Created < Dat


Then create new agent with this in Initialize event:

Sub Initialize
    Dim s As New NotesSession
    Dim dbSource As NotesDatabase, dbDest As NotesDatabase
    Dim source As NotesView
    Dim vc As NotesViewEntryCollection
    Dim ve As NotesViewEntry, tmpve As NotesViewEntry
    Dim rez(1) As String
   
    rez(0) = "<DestinationServerName>"
    rez(1) = "<DestinationFilePathRelativeToData>"
    Set dbSource = s.CurrentDatabase
   
    Set source = dbSource.GetView( "OlderThenWeek" )
    Set vc = source.AllEntries
   
    Set dbDest = s.GetDatabase( rez(0), rez(1), False )
   
    Set ve = vc.GetFirstEntry
    Do Until ve Is Nothing
        Call ve.Document.CopyToDatabase( dbDest )
        Set tmpve = ve
        Set ve = vc.GetNextEntry( ve )
        Call tmpve.Document.Remove( True )
    Loop    
   
End Sub

You can schedule the agent or make it run after agent list selection.
As Target specify All documents in a database.

Hope this helps,
Marko
0
 
LVL 3

Expert Comment

by:NARoberts
ID: 16382049
I've found different archiving methods work better over others.  We set our to only archive selected documents and then you just select what you want to archive and select 'archive selected documents' instead of 'archive now'.  There archive feature is rather flakey.  Try some different setups w/ it, maybe it will work, thats probably your best bet.

You could also modify your design and just add a simple agent that would run from the menu.  If you use simple functions, its real easy!!  Just have on command to copy to a db, then on to delete.  Set it up to work on selected documents only or maybe you can do a selection on age there but not sure on that!
0
 
LVL 1

Author Comment

by:kevinsmith121
ID: 16436084
Many thanks mbonaci, spot on advice!

Kevin
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
Screencast - Getting to Know the Pipeline
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question