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.
There are two types of files on Syncrify server that can be used to create custom reports.
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 since Jan 01, 1970 when next scheduled backup will run. |
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.
<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.
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:
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 |
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.
When this option is turned on, 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 off of $INSTALLDIR/ClientBackupLogs folder.
Files names use the following format:
DATE_SIZE.csvThe first token contains a date value represented in milliseconds since January 01, 1970. The second token holds total bytes transferred.
Every CSV file contains 3 columns: