Name für Log eingebaut

This commit is contained in:
Michael Grote 2021-03-18 09:47:29 +01:00
parent dd3a3f99dd
commit e371666615
3 changed files with 42 additions and 25 deletions

View file

@ -18,14 +18,22 @@ $hostname_ist = $env:computername
$hostname_soll = "irantu"
# Ziele/Quellen
$quelle1 ="\\fileserver2.grote.lan\mg\"
$quelle2 ="\\fileserver2.grote.lan\Musik\"
$quelle3 ="\\fileserver2.grote.lan\amd\"
$quelle4 ="\\fileserver2.grote.lan\backup\"
$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"
$quelle7 ="\\fileserver2.grote.lan\bilder"
$quelle8 ="\\fileserver2.grote.lan\proxmox"
$ziel1_name= "mg"
$ziel2_name= "musik"
$ziel3_name= "amd"
$ziel4_name= "backup"
$ziel5_name= "filme"
$ziel6_name= "serien"
$ziel7_name= "bilder"
$ziel8_name= "proxmox"
$ziel1="$scriptpfad\backup\mg"
$ziel2="$scriptpfad\backup\Musik"
$ziel3="$scriptpfad\backup\amd"
@ -47,11 +55,11 @@ if ($hostname_ist -eq $hostname_soll)
Exit 1
}
robocopy $quelle1 $ziel1 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp.log" /XD "\\fileserver2.grote.lan\mg\Programme\Spiele - nicht gesichert"
robocopy $quelle2 $ziel2 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp.log"
robocopy $quelle3 $ziel3 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp.log"
robocopy $quelle4 $ziel4 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp.log"
robocopy $quelle5 $ziel5 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp.log"
robocopy $quelle6 $ziel6 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp.log"
robocopy $quelle7 $ziel7 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp.log"
robocopy $quelle8 $ziel8 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp.log"
robocopy $quelle1 $ziel1 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp-$quelle1_name.log" /XD "\\fileserver2.grote.lan\mg\Programme\Spiele - nicht gesichert"
robocopy $quelle2 $ziel2 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp-$quelle2_name.log"
robocopy $quelle3 $ziel3 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp-$quelle3_name.log"
robocopy $quelle4 $ziel4 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp-$quelle4_name.log"
robocopy $quelle5 $ziel5 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp-$quelle5_name.log"
robocopy $quelle6 $ziel6 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp-$quelle6_name.log"
robocopy $quelle7 $ziel7 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp-$quelle7_name.log"
robocopy $quelle8 $ziel8 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp-$quelle8_name.log"

View file

@ -21,6 +21,9 @@ $hostname_soll = "irantu"
$quelle1 = "C:\VM"
$quelle2 = "C:\Portable_Programme"
$quelle3 = "C:\Users\mg\Desktop"
$quelle_name1 = "vm"
$quelle_name2 = "programme"
$quelle_name3 = "desktop"
$ziel1="$scriptpfad\$hostname_ist\VM"
$ziel2="$scriptpfad\$hostname_ist\Portable_Programme"
$ziel3="$scriptpfad\$hostname_ist\Desktop"
@ -37,6 +40,6 @@ if ($hostname_ist -eq $hostname_soll)
}
robocopy $quelle1 $ziel1 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp.log"
robocopy $quelle2 $ziel2 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp.log"
robocopy $quelle3 $ziel3 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp.log"
robocopy $quelle1 $ziel1 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp-$quelle1_name.log"
robocopy $quelle2 $ziel2 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp-$quelle2_name.log"
robocopy $quelle3 $ziel3 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp-$quelle3_name.log"

View file

@ -18,12 +18,18 @@ $hostname_ist = $env:computername
$hostname_soll = "andreasgrote"
# Ziele/Quellen
$quelle1 ="\\nas\backup\"
$quelle2 ="\\nas\bilder\"
$quelle3 ="\\nas\dokumente\"
$quelle4 ="\\nas\musik\"
$quelle1 ="\\nas\backup"
$quelle2 ="\\nas\bilder"
$quelle3 ="\\nas\dokumente"
$quelle4 ="\\nas\musik"
$quelle5 ="\\nas\videos"
$quelle6 ="\\nas\rest"
$quelle1_name ="backup"
$quelle2_name ="bilder"
$quelle3_name ="dokumente"
$quelle4_name ="musik"
$quelle5_name ="videos"
$quelle6_name ="rest"
$ziel1="$scriptpfad\backup\backup"
$ziel2="$scriptpfad\backup\bilder"
$ziel3="$scriptpfad\backup\dokumente"
@ -43,9 +49,9 @@ if ($hostname_ist -eq $hostname_soll)
Exit 1
}
robocopy $quelle1 $ziel1 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp.log" /XD $quelle1\@recycle $quelle1\@Recently-snapshot
robocopy $quelle2 $ziel2 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp.log" /XD $quelle2\@recycle $quelle2\@Recently-snapshot
robocopy $quelle3 $ziel3 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp.log" /XD $quelle3\@recycle $quelle3\@Recently-snapshot
robocopy $quelle4 $ziel4 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp.log" /XD $quelle4\@recycle $quelle4\@Recently-snapshot
robocopy $quelle5 $ziel5 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp.log" /XD $quelle5\@recycle $quelle5\@Recently-snapshot
robocopy $quelle6 $ziel6 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp.log" /XD $quelle6\@recycle $quelle6\@Recently-snapshot
robocopy $quelle1 $ziel1 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp-$quelle1_name.log" /XD $quelle1\@recycle $quelle1\@Recently-Snapshot
robocopy $quelle2 $ziel2 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp-$quelle2_name.log" /XD $quelle2\@recycle $quelle2\@Recently-Snapshot
robocopy $quelle3 $ziel3 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp-$quelle3_name.log" /XD $quelle3\@recycle $quelle3\@Recently-Snapshot
robocopy $quelle4 $ziel4 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp-$quelle4_name.log" /XD $quelle4\@recycle $quelle4\@Recently-Snapshot
robocopy $quelle5 $ziel5 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp-$quelle5_name.log" /XD $quelle5\@recycle $quelle5\@Recently-Snapshot
robocopy $quelle6 $ziel6 /MIR /R:3 /W:10 /DST /TEE /UNILOG+:"$scriptpfad\$timestamp-$quelle6_name.log" /XD $quelle6\@recycle $quelle6\@Recently-Snapshot