Skip to content

Commit

Permalink
Merge pull request #31 from awinnen/deleteBackupAfterDownload
Browse files Browse the repository at this point in the history
add option to remove backup from app after it has been downloaded
  • Loading branch information
SebastianStehle authored Jun 3, 2019
2 parents 660f0fc + 0a6b0d4 commit 916a591
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cli/Squidex.CLI/Squidex.CLI/Commands/App_Backup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ public async Task Create(CreateArguments arguments)
}

Console.WriteLine("Backup completed. Download completed");

if (arguments.DeleteAfterDownload)
{
Console.WriteLine("Removing backup from app...");
await backupsClient.DeleteBackupAsync(app, foundBackup.Id.ToString());
}
}
else
{
Expand All @@ -88,6 +94,9 @@ public sealed class CreateArguments : IArgumentModel
[Option(LongName = "timeout", Description = "The timeout to wait for the backup in minutes.")]
public int Timeout { get; set; } = 30;

[Option(LongName = "deleteAfterDownload", Description = "Defines wether the created backup shall be deleted from app after the backup task is completed")]
public bool DeleteAfterDownload { get; set; }

[Argument(Name = "file", Description = "The target file.")]
public string File { get; set; }

Expand Down

0 comments on commit 916a591

Please sign in to comment.