Eplan Platform API
EPLAN API / API Reference / Actions / backup
In This Topic
    backup
    In This Topic
    Action class for backup functions. Backs up a project and master data (forms, symbols, ...) to disk
    

    Parameter Description

    TYPE

    Type of task to be performed.
    "PROJECT": Backing up the entire project. 
    "MASTERDATA": Backing up the master data.
    

    PROJECTNAME

    Project name with full path (optional). 
    If not entered, the selected project is used when the action is called from GUI (like from a script or ribbon bar). 
    If called from the windows command line, the PROJECTNAME must be set or the ProjectAction must be used first (see also "ProjectAction"), otherwise an exception is thrown (see also "System.ArgumentException").
    

    ARCHIVENAME

    Archive name.
    Name of the file where the backed up data is to be saved (without path information).
    

    DESTINATIONPATH

    Target directory
    

    COMMENT

    Remark on backup (optional).
    The remark is written as a string to the corresponding property of the backed up project.
    Default = corresponding property is not set.
    

    BACKUPAMOUNT

    An enum constant that may assume the following values:
    "BACKUPAMOUNT_ALL": The contents of the project directory is backed up completely.
    "BACKUPAMOUNT_MIN": Only the database files required to restore the project are backed up; redundant database files are ignored.
    Default = "BACKUPAMOUNT_ALL".
    

    COMPRESSPRJ

    Specifies whether the database is to be compressed before being backed up (optional, 0 = No, 1= Yes).
    Default = 0
    

    INCLEXTDOCS

    Specifies whether external documents are to be included in the backup (optional, 0 = No, 1= Yes).
    Default = 0
    

    INCLIMAGES

    Specifies whether image files are to be included in the backup (optional, 0 = No, 1=Yes).
    Default = 0
    

    COPYREFDATA

    Specifies whether external files that are referenced by the project 
    are copied to the project's directory (the "\DOC" subdirectory) before the backup.
    (optional, 0 = No, 1 = Yes).
    Default = 0
    Valid only if TYPE parameter equals "PROJECT".
    

    BACKUPMETHOD

     Type of backup. 
    "BACKUP": Project is backed up 
    "SOURCEOUT": Project is filed off 
    "ARCHIVE": Project is archived.
    

    MDTYPE

    Type of master data to be backed up.
    "SYMBOLS",
    "MACROS",
    "FORMS",
    "ARTICLES",
    "LANGUAGES",
    "STANDARDSHEET",
    "STATIONDATA"
    

    SOURCEPATH

    Source directory, only applies to backup of master data.
    

    FILENAME

    Name of the file to be backed up.
    • The file name can be entered with or without the complete path.
    • The file extension must be specified.
    • A file extension with a wildcard is also possible (for example: /FILENAME:*.fn1, /FILENAME:*.*, /FILENAME:*sh)
    This only applies to the backup of master data.
    

    Remarks
    Archive names of the form <some name>.nnn (n = a digit 0 - 9) are forbidden, because an archive name of this form (with a three-digit-extension) is automatically created when the backup file is split into several parts. 
    When an error occurs during a data backup operation, a "BaseException" is thrown.
    

    Example
    Backup project:
    
    backup /TYPE:PROJECT /PROJECTNAME:C:\Projects\EPLAN\EPLAN_Sample_Project.elk /DESTINATIONPATH:U:\temp /ARCHIVENAME:EPLAN_Sample_Project.zw1 /COMMENT:Hello /BACKUPMETHOD:BACKUP /BACKUPAMOUNT:BACKUPAMOUNT_ALL /COMPRESSPRJ:0 /INCLEXTDOCS:1 /INCLIMAGES:1
    
    backup  /TYPE:PROJECT /COMMENT:Hello /DESTINATIONPATH:U:\temp /ARCHIVENAME:EPLAN_Sample_Project.zw1 /BACKUPMETHOD:BACKUP /BACKUPAMOUNT:BACKUPAMOUNT_ALL /COMPRESSPRJ:0 /INCLEXTDOCS:1 /INCLIMAGES:1
    

    Backup master data:
    
    Backup plot frame with full path:
    
    backup /TYPE:MASTERDATA /FILENAME:C:\PlotFrames\EPLAN\ESS_A3DP.fn1 /SOURCEPATH:C:\PlotFrames\EPLAN /DESTINATIONPATH:U:\temp /ARCHIVENAME:my_MasterData /COMMENT:"Hello world" /MDTYPE:STANDARDSHEET
    
    Backup plot frame without full path:
    
    backup /TYPE:MASTERDATA /FILENAME:ESS_A3DP.fn1 /SOURCEPATH:C:\PlotFrames\EPLAN /DESTINATIONPATH:U:\temp /ARCHIVENAME:my_MasterData /COMMENT:"Hello world" /MDTYPE:STANDARDSHEET
    
    Backup all plot frames (*.fn1):
    
    backup /TYPE:MASTERDATA /FILENAME:*.fn1 /SOURCEPATH:C:\PlotFrames\EPLAN /DESTINATIONPATH:U:\temp /ARCHIVENAME:my_MasterData /COMMENT:"Hello world" /MDTYPE:STANDARDSHEET
    
    Backup all files (*.*) in specified source directory:
    
    backup /TYPE:MASTERDATA /FILENAME:*.* /SOURCEPATH:C:\PlotFrames\EPLAN /DESTINATIONPATH:U:\temp /ARCHIVENAME:my_MasterData /COMMENT:"Hello world" /MDTYPE:STANDARDSHEET
    
    Backup all files (*.*) in specified source directory whose file extensions include 'sh':
    
    backup /TYPE:MASTERDATA /FILENAME:*sh /SOURCEPATH:C:\PlotFrames\EPLAN /DESTINATIONPATH:U:\temp /ARCHIVENAME:my_MasterData /COMMENT:"Hello world" /MDTYPE:STANDARDSHEET