bin/projects/dbatools/dbatools/Database/BackupHistory.cs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
using System;
using System.Numerics;
using Sqlcollaborative.Dbatools.Utility;
 
namespace Sqlcollaborative.Dbatools.Database
{
    /// <summary>
    /// Object containing the information about the history of mankind ... or a database backup. WHo knows.
    /// </summary>
    public class BackupHistory
    {
        /// <summary>
        /// The name of the computer running MSSQL Server
        /// </summary>
        public string ComputerName;
 
        /// <summary>
        /// The Instance that was queried
        /// </summary>
        public string InstanceName;
 
        /// <summary>
        /// The full Instance name as seen from outside
        /// </summary>
        public string SqlInstance;
 
        /// <summary>
        /// The Database that was backed up
        /// </summary>
        public string Database;
 
        /// <summary>
        /// The user that is running the backup
        /// </summary>
        public string UserName;
 
        /// <summary>
        /// When was the backup started
        /// </summary>
        public DateTime Start;
 
        /// <summary>
        /// When did the backup end
        /// </summary>
        public DateTime End;
 
        /// <summary>
        /// What was the longest duration among the backups
        /// </summary>
        public DbaTimeSpan Duration;
 
        /// <summary>
        /// Where is the backup stored
        /// </summary>
        public string[] Path;
 
        /// <summary>
        /// What is the total size of the backup
        /// </summary>
        public Size TotalSize;
 
        /// <summary>
        /// What is the total compressesed size of the backup
        /// </summary>
        public Size CompressedBackupSize;
 
        /// <summary>
        /// What is the ratio of total size to compressed size of the backup
        /// </summary>
        public double CompressionRatio;
 
        /// <summary>
        /// The kind of backup this was
        /// </summary>
        public string Type;
 
        /// <summary>
        /// The ID for the Backup job
        /// </summary>
        public string BackupSetId;
 
        /// <summary>
        /// What kind of backup-device was the backup stored to
        /// </summary>
        public string DeviceType;
 
        /// <summary>
        /// What is the name of the backup software?
        /// </summary>
        public string Software;
 
        /// <summary>
        /// The full name of the backup
        /// </summary>
        public string[] FullName;
 
        /// <summary>
        /// The files that are part of this backup
        /// </summary>
        public object FileList;
 
        /// <summary>
        /// The position of the backup
        /// </summary>
        public int Position;
 
        /// <summary>
        /// The first Log Sequence Number
        /// </summary>
        public BigInteger FirstLsn;
 
        /// <summary>
        /// The Log Squence Number that marks the beginning of the backup
        /// </summary>
        public BigInteger DatabaseBackupLsn;
 
        /// <summary>
        /// The checkpoint's Log Sequence Number
        /// </summary>
        public BigInteger CheckpointLsn;
 
        /// <summary>
        /// The last Log Sequence Number
        /// </summary>
        public BigInteger LastLsn;
 
        /// <summary>
        /// The primary version number of the Sql Server
        /// </summary>
        public int SoftwareVersionMajor;
         
        /// <summary>
        /// Was the backup performed with the CopyOnlyOption
        /// </summary>
        public Boolean IsCopyOnly;
 
        /// <summary>
        /// Recovery Fork backup was takeon
        /// </summary>
        public Guid LastRecoveryForkGUID;
 
        /// <summary>
        /// Recovery Model of the database when backup was taken
        /// </summary>
        public string RecoveryModel;
         
    }
}