none
Best method for archiving .mpp files on a separate server or location? RRS feed

  • Question

  • We want to be able to run a program or job on Project Server 2013 that will export all current published project .mpp files to a separate server or location on our network. What is the best, or suggested, method for something like this? Our managers want to have this job run on a weekly or bi-monthly basis in order to have backup files of each active project schedule. This would be beyond the Project Server archive database. This would be for Business Continuity purposes of having those schedules available should our servers ever crash. 

    Any help would be much appreciated. I am not a developer, but if there is code available for something like this we have developers in-house that can perform the work. 

    Thank you,

    Travis


    Travis Long IT Project Manager Entry Idaho Power Co. Project Server Admin

    Wednesday, September 3, 2014 3:31 PM

Answers

  • Project server already has an archiving mechanism which backs up project plans based on schedule and maitains versions of it which can be restored at any point ? check administrative backup in central Admin under PWA settings

    However I wouldn't say this is the best method, but you can run a macro which would export all projects and save it at a location(could be network file share), Something like this (havent tested it recently with 2013 but i believe should work

    Sub Archiving()

    Dim Conn As New ADODB.Connection
    Dim Cmd As New ADODB.Command
    Dim Recs As New ADODB.Recordset

    'Connect to Project Server Reporting DB, Get Project Names
    Conn.ConnectionString = "Provider=SQLOLEDB;Data Source=servername;Initial Catalog=ProjectServer_Reporting;User ID=; Password=; Trusted_Connection=yes"
    Conn.Open


    With Cmd
        .ActiveConnection = Conn
        .CommandText = "Select ProjectName From MSP_EpmProject_UserView"
        .CommandType = adCmdText
    End With

     With Recs
        .CursorType = adOpenStatic
        .CursorLocation = adUseClient
        .LockType = adLockOptimistic
        .Open Cmd
      End With
    Dim prjName As String
    Dim ArchivePrjName As String

    Application.Alerts (False)
    If Recs.EOF = False Then
       Recs.MoveFirst
       For x = 1 To CInt(Recs.RecordCount)
       
        prjName = "<>\" + Recs.Fields(0)
        FileOpenEx Name:=prjName, ReadOnly:=True
       
        ArchivePrjName = "C:\Temp\" & prjName & "4Sep2014_9PM"
        FileSaveAs Name:=ArchivePrjName, FormatID:="MSProject.MPP"

        FileCloseEx
        prjName = ""
        Recs.MoveNext
       Next x
    End If
       Recs.Close
       Conn.Close
    End Sub

     Let us know if this helps


    Thanks | epmXperts | http://epmxperts.wordpress.com


    Thursday, September 4, 2014 2:56 PM
    Moderator
  • I would say the same macro can also Print schedules as PDF try the FilePrint command in the macro, it may need more testing i am thinking loud

    Thanks | epmXperts | http://epmxperts.wordpress.com

    • Marked as answer by TravisLong Monday, May 18, 2015 9:23 PM
    Wednesday, September 10, 2014 3:05 PM
    Moderator

All replies

  • Project server already has an archiving mechanism which backs up project plans based on schedule and maitains versions of it which can be restored at any point ? check administrative backup in central Admin under PWA settings

    However I wouldn't say this is the best method, but you can run a macro which would export all projects and save it at a location(could be network file share), Something like this (havent tested it recently with 2013 but i believe should work

    Sub Archiving()

    Dim Conn As New ADODB.Connection
    Dim Cmd As New ADODB.Command
    Dim Recs As New ADODB.Recordset

    'Connect to Project Server Reporting DB, Get Project Names
    Conn.ConnectionString = "Provider=SQLOLEDB;Data Source=servername;Initial Catalog=ProjectServer_Reporting;User ID=; Password=; Trusted_Connection=yes"
    Conn.Open


    With Cmd
        .ActiveConnection = Conn
        .CommandText = "Select ProjectName From MSP_EpmProject_UserView"
        .CommandType = adCmdText
    End With

     With Recs
        .CursorType = adOpenStatic
        .CursorLocation = adUseClient
        .LockType = adLockOptimistic
        .Open Cmd
      End With
    Dim prjName As String
    Dim ArchivePrjName As String

    Application.Alerts (False)
    If Recs.EOF = False Then
       Recs.MoveFirst
       For x = 1 To CInt(Recs.RecordCount)
       
        prjName = "<>\" + Recs.Fields(0)
        FileOpenEx Name:=prjName, ReadOnly:=True
       
        ArchivePrjName = "C:\Temp\" & prjName & "4Sep2014_9PM"
        FileSaveAs Name:=ArchivePrjName, FormatID:="MSProject.MPP"

        FileCloseEx
        prjName = ""
        Recs.MoveNext
       Next x
    End If
       Recs.Close
       Conn.Close
    End Sub

     Let us know if this helps


    Thanks | epmXperts | http://epmxperts.wordpress.com


    Thursday, September 4, 2014 2:56 PM
    Moderator
  • Yes, I know Project Server has the built-in archiving mechanism, but we are looking for something beyond that. The macro you provided is more in line with what we are looking at doing. This would meet our requirements. So thank you for providing that!

    Another question: Does anyone know if there is a tool or integration that would export the project schedules out of Project Server and convert them to an XPS or PDF document automatically? Our leaders are askign for something more accessible by the majority, rather than just those with MS Project on their machine. If not, I believ the macro provided by epmXperts would do the job.

    Thank you!

     

    Travis Long IT Project Manager Entry Idaho Power Co. Project Server Admin

    Wednesday, September 10, 2014 3:01 PM
  • I would say the same macro can also Print schedules as PDF try the FilePrint command in the macro, it may need more testing i am thinking loud

    Thanks | epmXperts | http://epmxperts.wordpress.com

    • Marked as answer by TravisLong Monday, May 18, 2015 9:23 PM
    Wednesday, September 10, 2014 3:05 PM
    Moderator
  • OK, great. I will look into that as well.

    Thank you!


    Travis Long IT Project Manager Entry Idaho Power Co. Project Server Admin

    Wednesday, September 10, 2014 3:07 PM