Scripte aufgeteilt in videos und alles; für 8TB Platte
This commit is contained in:
parent
b66b47d60f
commit
6cce87e379
2 changed files with 45 additions and 6 deletions
|
@ -22,24 +22,24 @@ $quelle1 ="\\fileserver2.grote.lan\mg"
|
|||
$quelle2 ="\\fileserver2.grote.lan\Musik"
|
||||
$quelle3 ="\\fileserver2.grote.lan\amd"
|
||||
$quelle4 ="\\fileserver2.grote.lan\backup"
|
||||
$quelle5 ="\\fileserver2.grote.lan\Videos\Filme - ueberragende"
|
||||
$quelle6 ="\\fileserver2.grote.lan\Videos\Serien - überragende"
|
||||
$quelle5 =""
|
||||
$quelle6 =""
|
||||
$quelle7 ="\\fileserver2.grote.lan\bilder"
|
||||
$quelle8 ="\\fileserver2.grote.lan\proxmox"
|
||||
$quelle1_name= "mg"
|
||||
$quelle2_name= "musik"
|
||||
$quelle3_name= "amd"
|
||||
$quelle4_name= "backup"
|
||||
$quelle5_name= "filme"
|
||||
$quelle6_name= "serien"
|
||||
$quelle5_name= ""
|
||||
$quelle6_name= ""
|
||||
$quelle7_name= "bilder"
|
||||
$quelle8_name= "proxmox"
|
||||
$ziel1="$scriptpfad\backup\mg"
|
||||
$ziel2="$scriptpfad\backup\Musik"
|
||||
$ziel3="$scriptpfad\backup\amd"
|
||||
$ziel4="$scriptpfad\backup\backup"
|
||||
$ziel5="$scriptpfad\backup\Videos\Filme - ueberragende"
|
||||
$ziel6="$scriptpfad\backup\Videos\Serien - ueberragende"
|
||||
$ziel5=""
|
||||
$ziel6=""
|
||||
$ziel7="$scriptpfad\backup\bilder"
|
||||
$ziel8="$scriptpfad\backup\proxmox"
|
||||
|
39
fileserver-hdds-videos.ps1
Normal file
39
fileserver-hdds-videos.ps1
Normal file
|
@ -0,0 +1,39 @@
|
|||
# Funktion: speichert den aktuellen PFad(vgl. pwd) in Get-ScriptDirectory
|
||||
function Get-ScriptDirectory {
|
||||
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
|
||||
Split-Path $Invocation.MyCommand.Path
|
||||
}
|
||||
|
||||
# Funktion: setze Timestamp, mit Rückgabewert
|
||||
function get-timestamp{
|
||||
$timestamp = (get-date -Format yyyy_MM_dd__HH_mm_ss)
|
||||
return $timestamp
|
||||
}
|
||||
|
||||
# restliche Variablen
|
||||
$timestamp = get-timestamp # Ruft Funktion get-timestamp auf
|
||||
$scriptpfad = Get-ScriptDirectory # setzt $scriptpfad auf den Wert von Get-ScriptDirectory
|
||||
# Hhostname
|
||||
$hostname_ist = $env:computername
|
||||
$hostname_soll = "irantu"
|
||||
|
||||
# Ziele/Quellen
|
||||
$quelle1 ="\\fileserver2.grote.lan\videos"
|
||||
$quelle1_name= "videos"
|
||||
$ziel1="$scriptpfad\backup\videos"
|
||||
|
||||
|
||||
# Hostname prüfen
|
||||
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
|
||||
}
|
||||
|
||||
robocopy $quelle1 $ziel1 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp-$quelle1_name.log"
|
||||
|
Loading…
Reference in a new issue