Syncrify » Knowledge base

Document information

Document ID: 2009
Subject: Creating custom reports in Syncrify
Creation date: 3/29/12 4:41 PM
Last modified on: 11/21/22 1:39 PM


Creating custom reports

Often companies, particularly ISPs providing backup service, want to create custom reports containing backup summary. This article discusses a few methods that can be used to create custom reports.

Summary Reports

There are two types of files on Syncrify server that can be used to create custom reports.
Report by users
Syncrify stores a file called access.log in every user's repository folder. For example, if the user's email address is john.doe@xyz.com and the repository path is C:\Backup, look for a file called access.log in C:\Backup\john.doe@xyz.com folder.

This file contains one line for every backup job that ran for this user. Fields in this file are pipe-delimited and the following table define their meaning

Field position Field description
1 Time backup started. This field is defined in milliseconds since Jan 01, 1970
2 Time backup ended. To get duration, subtract start time from this value.
3 Instance number. This is internally used by Syncrify.
4 Job number. This is internally used to identify each job
5 Total files transferred in this backup job
6 Total bytes transferred in this job
7 Profile name
8 Client's build number
9 Client's IP address
10 Number of errors
11 Name of the CSV file as explained in the Detailed Report section below.
12 Next run time - contains milliseconds for the next run. This number should be added to second field (Time backed ended) to give you an absolute time.

Combined Access.log

By default, there are several access.log files, one for every user. When importing these files into SQL server, it is easier if all of these files are combined by Syncrify into a single file. This is done by following the steps below.

  • Locate logconfig.xml file in the installation folder, which is typically C:\Syncrify or C:\Program Files\Syncrify on Windows and /opt/Syncrify on Linux.
  • Make a backup copy of logconfig.xml, in case you need to rollback.
  • Open logconfig.xml file in any editor.
  • Add two sections:
    <appender name="COMBINED_ACCESS_LOG" class="org.apache.log4j.RollingFileAppender">
    	   <param name="File" value="logs/CombinedAccessLog.log" />
    	   <param name="Append" value="true" />
    			   <param name="MaxFileSize" value="5MB" />
    	   <layout class="org.apache.log4j.PatternLayout">
    		 <param name="ConversionPattern" value="%m%n"/>
    	   </layout>
    </appender>
    The section for appender appears towards the top of the file.
    <category name="CombinedAccessLog" additivity="false">
      <priority value="DEBUG" />
      <appender-ref ref="COMBINED_ACCESS_LOG" />
    </category>
    The section for category goes towards the bottom of the file.
  • Save the file and restart.

Report by date
To create a report by date, look for files located in $INSTALL_DIR/Reports folder. The value for $INSTALL_DIR on Windows is usually C:\Syncrify and /opt/Syncrify on Linux, Mac and UNIX. Files in the Reports folder are in plain text using the following naming convention:

YYYYMMDD.srep

where YYYYMMDD represents a date value.

This file is also pipe-delimited and uses a similar format described above for access.log. The only difference is that the first token contains user's email address. The following table show define each field.

Field position Field description
1 User's email address
2 Time backup started. This field is defined in milliseconds since Jan 01, 1970
3 Time backup ended. To get duration, subtract start time from this value.
4 Instance number. This is internally used by Syncrify.
5 Job number. This is internally used to identify each job
6 Total files transferred in this backup job
7 Total bytes transferred in this job
8 Profile name
9 Client's build number
10 Client's IP address
11 Total Errors
12 CSV File name for logs
13 Next run time - contains milliseconds since Jan 01, 1970 when next scheduled backup will run

Detailed Reports

Besides the two files described above, you can optionally create another set of files containing backup logs. These logs are stored in CSV format and can be easily imported into a relational database for reporting purposes. Watch this video if you need help importing a CSV file in a database.

This option is disabled by default. Follow the steps below to turn it on.
  • Log in as admin to the web interface
  • Click Configuration and then Advanced Configuration
  • Check Save client log
  • Click Save button

When this option is turned on, the Syncrify client will send the backup log to the server, which then converts that into a CSV file and saves it to a local folder. These files are located on the $INSTALLDIR/ClientBackupLogs folder.

File names use the following format:

DATE_ELAPSEDTIME.csv

The first token contains a date with the value represented in milliseconds since January 01, 1970. The second token holds the number of milliseconds the backup ran for.

File format

Every CSV file contains 3 columns:
  1. Action -Contains an integer from 1 to 7 signifying the state of the file.
    1. Entire file
    2. No change
    3. Partial file
    4. Deleted
    5. Restored - (Partial file)
    6. Error
    7. Warning
    8. Restored - (Entire file)
  2. File size -
  3. File path -




Add a comment to this document

Do you have a helpful tip related to this document that you'd like to share with other users?

Important: This area is reserved for useful tips. Therefore, do not post any questions here. Instead, use our public forums to post questions.

Navigation

Social Media

Powered by 10MinutesWeb.com