|
@@ -4,6 +4,7 @@ function backup_to_server {
|
|
|
|
|
|
param(
|
|
param(
|
|
[switch]$skipappdir,
|
|
[switch]$skipappdir,
|
|
|
|
+ [switch]$skipspudir,
|
|
[switch]$noupload,
|
|
[switch]$noupload,
|
|
[switch]$skipoutlook)
|
|
[switch]$skipoutlook)
|
|
|
|
|
|
@@ -46,6 +47,26 @@ function backup_to_server {
|
|
} -ArgumentList @($exclude, $backup_file)
|
|
} -ArgumentList @($exclude, $backup_file)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ # Create a compressed version of the OneDrive - SPU Dir
|
|
|
|
+ if (!($skipspudir)) {
|
|
|
|
+
|
|
|
|
+ # Create the main backup file
|
|
|
|
+ $backup_file = "$backup_dir\spudir.7z"
|
|
|
|
+
|
|
|
|
+ # Make sure we start in the home folder
|
|
|
|
+ Set-Location $HOME
|
|
|
|
+
|
|
|
|
+ # Remove the previous file (start clean each time)
|
|
|
|
+ if (Test-Path $backup_file) { Remove-Item $backup_file }
|
|
|
|
+
|
|
|
|
+ # Load the exclude list
|
|
|
|
+ $exclude = parse_appdata_exclude
|
|
|
|
+
|
|
|
|
+ # Generate the compressed backup
|
|
|
|
+ Invoke-Command -ScriptBlock { sz a -bb0 -t7z $args[0] "$HOME\OneDrive - Seattle Pacific University"
|
|
|
|
+ } -ArgumentList @($backup_file)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
if (!($noupload)) {
|
|
if (!($noupload)) {
|
|
|
|
|