Skip to content

Commit a98daef

Browse files
authored
Improved Backup Index API. Raise prerelease version of the Search. (#2200)
* Add TargetPath property to the BackupInfo. Raise prerelease version of the Search. * Fix BackupInfo.Clone() * Add "IndexBackupDirectory" keys to appConfigs. * Remove magic string from health apikeys * Add App_Data/IndexBackup to gitignore * The "target" param of the BackupIndex endpoint is optional.
1 parent 6d581d2 commit a98daef

File tree

12 files changed

+23
-10
lines changed

12 files changed

+23
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,5 +260,6 @@ paket-files/
260260
/src/Services.Core.Install/*.zip
261261
**/App_Data/LuceneIndex
262262
**/App_Data/LocalIndex
263+
**/App_Data/IndexBackup
263264
**/App_Data/Logs
264265
/src/WebApps/**/install-services-core

src/ContentRepository/RepositoryTools.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ public static string CopyExplicitEntriesOfEveryoneToVisitor(Content root, string
585585
[ODataAction(Category = "Indexing")]
586586
[ContentTypes(N.CT.PortalRoot)]
587587
[AllowedRoles(N.R.Administrators, N.R.Developers)]
588-
public static async STT.Task<BackupResponse> BackupIndex(Content content, string target)
588+
public static async STT.Task<BackupResponse> BackupIndex(Content content, string target = null)
589589
{
590590
var engine = Providers.Instance.SearchEngine.IndexingEngine;
591591
var response = await engine.BackupAsync(target, CancellationToken.None)

src/Search/Indexing/BackupInfo.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ public class BackupInfo
1919
/// </summary>
2020
public DateTime FinishedAt { get; set; }
2121
/// <summary>
22+
/// Gets or sets the path of directory that contains the backed-up files.
23+
/// Can be relative or absolute.
24+
/// </summary>
25+
public string TargetPath { get; set; }
26+
/// <summary>
2227
/// Gets or sets the total length of the files to be copied.
2328
/// </summary>
2429
public long TotalBytes { get; set; }
@@ -53,6 +58,7 @@ public BackupInfo Clone()
5358
{
5459
StartedAt = StartedAt,
5560
FinishedAt = FinishedAt,
61+
TargetPath = TargetPath,
5662
TotalBytes = TotalBytes,
5763
CopiedBytes = CopiedBytes,
5864
CountOfFiles = CountOfFiles,

src/Search/SenseNet.Search.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net8.0</TargetFramework>
5-
<Version>2.5.1-alpha.2</Version>
5+
<Version>2.5.1-alpha.3</Version>
66
<AssemblyName>SenseNet.Search</AssemblyName>
77
<RootNamespace>SenseNet.Search</RootNamespace>
88
<Company>Sense/Net Inc.</Company>

src/WebApps/SnWebApplication.Api.InMem.Admin/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"AddJwtCookie": true
2929
},
3030
"ApiKeys": {
31-
"HealthCheckerUser": "__set_value_in_secret.json__"
31+
"HealthCheckerUser": ""
3232
}
3333
}
3434
}

src/WebApps/SnWebApplication.Api.InMem.TokenAuth/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"AddJwtCookie": true
2626
},
2727
"ApiKeys": {
28-
"HealthCheckerUser": "__set_value_in_secret.json__"
28+
"HealthCheckerUser": ""
2929
}
3030
}
3131
}

src/WebApps/SnWebApplication.Api.Sql.Admin/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"AddJwtCookie": true
4747
},
4848
"ApiKeys": {
49-
"HealthCheckerUser": "__set_value_in_secret.json__"
49+
"HealthCheckerUser": ""
5050
},
5151
"Tracing": {
5252
"StartupTraceCategories": ""

src/WebApps/SnWebApplication.Api.Sql.SearchService.Admin/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"AddJwtCookie": true
3838
},
3939
"ApiKeys": {
40-
"HealthCheckerUser": "__set_value_in_secret.json__"
40+
"HealthCheckerUser": ""
4141
},
4242
"search": {
4343
"service": {

src/WebApps/SnWebApplication.Api.Sql.SearchService.TokenAuth.Preview/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"AddJwtCookie": true
2929
},
3030
"ApiKeys": {
31-
"HealthCheckerUser": "__set_value_in_secret.json__"
31+
"HealthCheckerUser": ""
3232
},
3333
"Email": {
3434
"Server": "",

src/WebApps/SnWebApplication.Api.Sql.SearchService.TokenAuth/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"AddJwtCookie": true
2929
},
3030
"ApiKeys": {
31-
"HealthCheckerUser": "__set_value_in_secret.json__"
31+
"HealthCheckerUser": ""
3232
},
3333
"Email": {
3434
"Server": "",

0 commit comments

Comments
 (0)