neue funktion: rebuild-index
This commit is contained in:
parent
b78d03eb0a
commit
2484e5db42
1 changed files with 13 additions and 13 deletions
26
Befehle.ps1
26
Befehle.ps1
|
@ -17,24 +17,24 @@ $excludefile="C:\Users\mg\Desktop\NextCloud\Programme\restic\config\exclude.txt"
|
|||
#ausgabe der varriablen und einfärben der werte mit -foregroundcolor
|
||||
#`n ist zeilenumbruch
|
||||
write-host "===================================="
|
||||
write-host "Repository: "
|
||||
write-host "Repository: "
|
||||
write-host -ForegroundColor Yellow $repository
|
||||
write-host "Pfad zu Restic: "
|
||||
write-host "Pfad zu Restic: "
|
||||
write-host -ForegroundColor Yellow $pfad
|
||||
write-host "Passworddatei: "
|
||||
write-host "Passworddatei: "
|
||||
write-host -ForegroundColor Yellow $passwordfile
|
||||
write-host "===================================="
|
||||
write-host -ForegroundColor Red "Auschlüsse: "
|
||||
get-content $excludefile
|
||||
write-host "====================================`n`n"
|
||||
|
||||
do
|
||||
do
|
||||
{
|
||||
write-host "===================================="
|
||||
write-host "Befehl eingeben: "
|
||||
Write-Host " 1 = Check`n 2 = Forget(Standard...)`n 3 = Prune`n 4 = Snapshots anzeigen`n 5 = Befehl absetzen`n 6 = unlock`n 7 = Befehlszeile ausgeben"
|
||||
Write-Host " 8 = Restore - komplett`n 9 = Restore - nur bestimmte Daten`n10 = Restore - alles bis auf bestimmte Daten"
|
||||
Write-Host "11 = Snapshot löschen`n99 = Beenden"
|
||||
Write-Host "11 = Snapshot löschen`n12 = Rebuild-Index`n99 = Beenden"
|
||||
write-host "===================================="
|
||||
$aktion = Read-Host
|
||||
switch ($aktion)
|
||||
|
@ -44,27 +44,27 @@ do
|
|||
2 {& $pfad -r $repository --password-file $passwordfile forget --keep-daily 7 --keep-weekly 5 --keep-monthly 12 --keep-yearly 5 ; break}
|
||||
3 {& $pfad -r $repository --password-file $passwordfile prune ; break}
|
||||
4 {& $pfad -r $repository --password-file $passwordfile snapshots ; break}
|
||||
5 {
|
||||
5 {
|
||||
write-host "Befehl?";
|
||||
$befehl=Read-Host;
|
||||
& $pfad -r $repository --password-file $passwordfile $befehl;
|
||||
& $pfad -r $repository --password-file $passwordfile $befehl;
|
||||
break
|
||||
}
|
||||
99 {exit;break}
|
||||
6 {& $pfad -r $repository --password-file $passwordfile unlock; break}
|
||||
7 {
|
||||
7 {
|
||||
write-host "Befehl?";
|
||||
$befehl=Read-Host;
|
||||
write-host -nonewline $pfad -r $repository --password-file $passwordfile $befehl;
|
||||
write-host `n
|
||||
write-host `n
|
||||
break
|
||||
}
|
||||
}
|
||||
8 {
|
||||
write-host "Snapshot(latest/id)"
|
||||
$snapshot = read-host
|
||||
write-host "Zielpfad: "
|
||||
$target = read-host
|
||||
& $pfad -r $repository --password-file $passwordfile restore $snapshot --target $target
|
||||
& $pfad -r $repository --password-file $passwordfile restore $snapshot --target $target
|
||||
}
|
||||
9 {
|
||||
write-host "Snapshot(latest/id)"
|
||||
|
@ -89,11 +89,12 @@ do
|
|||
$exclude = read-host
|
||||
& $pfad -r $repository --password-file $passwordfile restore $snapshot --target $target --exclude $exclude
|
||||
}
|
||||
11 {
|
||||
11 {
|
||||
write-host "Snapshot(latest/id)"
|
||||
$snapshot = read-host
|
||||
& $pfad -r $repository --password-file $passwordfile forget $snapshot
|
||||
}
|
||||
12 {& $pfad -r $repository --password-file $passwordfile rebuild-index ; break}
|
||||
default{write-host "`nUngültige Eingabe!"}
|
||||
|
||||
}
|
||||
|
@ -106,4 +107,3 @@ do
|
|||
#while($abbrechen -eq "n")
|
||||
#führt die schleife immer wieder aus
|
||||
while (1 -eq 1)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue