alte rechner entfernt

This commit is contained in:
Michael Grote 2021-04-23 08:19:54 +02:00
parent 4a25cbcbe9
commit 17ea8b596b
2 changed files with 0 additions and 92 deletions

View file

@ -1,46 +0,0 @@
#Variablen
#Variablen setzen
#variablendeklaration pfade
#scriptpfad ermitteln
#funktion get-scriptdirectory definieren
function Get-ScriptDirectory {
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
Split-Path $Invocation.MyCommand.Path
}
#funktion an variable zuweisen
$scriptpfad = Get-ScriptDirectory
#hostname
$hostname_ist = $env:computername
$hostname_soll = "ada"
#### restic ####
### repository
$repository="\\fileserver2.grote.lan\backup\restic"
### ordner fuer sicherung
$ordner1="C:\Portabel"
$ordner2="C:\Users\mg\Desktop"
$ordner3="C:\Users\mg\AppData\Roaming\StardewValley"
$ordner4=""
$ordner5=""
### passwordfile
$passwordfile="C:\Users\mg\Desktop\NextCloud\Programme\restic\config\password.txt"
### exclude file
$excludefile="C:\Users\mg\Desktop\NextCloud\Programme\restic\config\exclude.txt"
### aktion/befehl
$befehl="backup"
# Hostname pruefen
if ($hostname_ist -eq $hostname_soll)
{
Write-Host "Host = $hostname_ist"
}
else
{
Write-Host "Falscher Host(SOLL: '$hostname_soll' IST:$hostname_ist)"
start-sleep 5
Exit 1
}
C:\Users\mg\Desktop\NextCloud\Programme\restic\bin\restic.exe -r $repository --password-file $passwordfile $befehl --exclude-file $excludefile $ordner1 $ordner2 $ordner3 $ordner4 $ordner5

View file

@ -1,46 +0,0 @@
#Variablen
#Variablen setzen
#variablendeklaration pfade
#scriptpfad ermitteln
#funktion get-scriptdirectory definieren
function Get-ScriptDirectory {
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
Split-Path $Invocation.MyCommand.Path
}
#funktion an variable zuweisen
$scriptpfad = Get-ScriptDirectory
#hostname
$hostname_ist = $env:computername
$hostname_soll = "vmw10mg"
#### restic ####
### repository
$repository="\\fileserver2.grote.lan\backup\restic"
### ordner fuer sicherung
$ordner1="C:\Users\mg\Desktop"
$ordner2=""
$ordner3=""
$ordner4=""
$ordner5=""
### passwordfile
$passwordfile="C:\Users\mg\Desktop\NextCloud\Programme\restic\config\password.txt"
### exclude file
$excludefile="C:\Users\mg\Desktop\NextCloud\Programme\restic\config\exclude.txt"
### aktion/befehl
$befehl="backup"
# Hostname pruefen
if ($hostname_ist -eq $hostname_soll)
{
Write-Host "Host = $hostname_ist"
}
else
{
Write-Host "Falscher Host(SOLL: '$hostname_soll' IST:$hostname_ist)"
start-sleep 5
Exit 1
}
C:\Users\mg\Desktop\NextCloud\Programme\restic\bin\restic.exe -r $repository --password-file $passwordfile $befehl --exclude-file $excludefile $ordner1 $ordner2 $ordner3 $ordner4 $ordner5