Jump to content

Search the Community

Showing results for tags 'powershell'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General Section
    • Announcements & News
    • Introduce Yourself
    • General Discussion
    • Recreational Activities
    • Entertainment
    • Private VIP Lounge
    • Art / Screenshot / PhotoGallery / Signature
    • Suggestion
  • Gaming - Discussion
    • Enemy Territory
    • Call of Duty Series
    • Insurgency Series
    • Day Of Infamy
    • Team Fortress
    • Battlefield Series
    • Counter Strike Series
    • Other Games
    • Console & Mobile Gaming
    • Complaints
  • Help & Discussion Center
    • Tutorials
    • Q&A / Reports / Issues
    • Downloads
    • Software & PC Support
    • Hardware Hangout
    • Reviews by Members for Members
    • Language Learning & Translation
  • ETPRO's Topics
  • ET Trick Jump's Topics
  • Clash of Royal's Topics
  • Clash of Clans's Topics
  • Rocket League's Topics
  • Cards Against Humanity's Topics
  • Eastside Hockey Manager's Topics
  • Trading's Topics
  • Board Games's Topics
  • ET Mapping's Topics

Calendars

  • Community Calendar
  • Gaming Events
  • ETPRO's Events
  • ET Trick Jump's Events
  • Trading's Events

Product Groups

  • Donation Packages
  • VIP Membership
  • Private Slot
  • ETPRO Events

Blogs

There are no results to display.

There are no results to display.

Categories

  • Fearless Assassins Software
  • Enemy Territory
    • Software
    • Maps
    • Map Scripts
    • Mods
    • Soundpacks
    • Skinpacks
    • LUA
    • Player Configs
    • Waypoints
    • Punkbuster
  • Call of Duty 4
    • Software
    • Mods
    • Maps
    • Player Configs
  • Other Games
    • Insurgency
    • Minecraft
    • Team Fortress 2
    • Counter Strike Series
  • Windows Software
  • Sounds

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Youtube


Steam


Xbox Live


PSN ID


Discord


Battlelog


Website URL


Skype


Occupation


Alias


Admin


Interests


SL


TB


Location


W:ET GUID


S:ET GUID


COD4 GUID


BF3 GUID


Steam ID


steamID64


T-M


S1


HC


B2

Found 1 result

  1. Hey guys i'm working as an IT-System Administrator for a company and they needed a "Low-Budget" Backup for their Files. this is running via a scheduled task everyday at 9pm on a server If you got some question u can feel free to ask me :3 i thought i could share the script (reduced to basic) for your computers Full script is made with PSVersion 5.1.14409.1018 # Full DAILY Backupscript with 7 Days to keep #region initializing # You can use this here if you need to place the files on a NAS / Server net use A: /d /y net use A: \\path\to\backup\folder /user:username password #endregion initializing ############################################################################################################################################################## ## ## ## ## ## ## Set Variables ## Set Variables ## Set Variables ## Set Variables ## ## ## ## ## ## ############################################################################################################################################################## #region Variables #F_DATE # Here you collect the date & how many days u want to keep files. # i'm doing it 7 days back $date = Get-Date -Format "yyyy-MM-dd" $Daysback = "-7" $DatetoDelete = (Get-Date).AddDays($Daysback).ToString('yyyy-MM-dd') Write-Host -ForegroundColor Red -BackgroundColor Black "Date Defined" #F_FPath # Here we define our Paths where the files gonna be. an empty folder to clear faster, the Logdrive, the Drive u are gonna Backup, the Path to the Backup, and another logfile path # also we create the actual folder :) $nofiles = "C:\Data\NoFiles" $strLogPath = "\\path\to\log\files\" $strMassDrive = "D:" $strBackupDrive = "\\path\to\backup" $strLogDrive = "\\path\to\webserver\for\LOG" New-Item -Path $strBackupDrive\$date -ItemType directory -ErrorAction Ignore Write-Host -ForegroundColor Red -BackgroundColor Black "Backup Paths defined" #F_Logfiles # some stuff for Logs # u don't need to change that :) $strLogFile ="$strBackupDrive\Logs\"+ $date + "_backup.txt" $strLogFile1 ="$strBackupDrive\Logs\"+ $date + "_full.txt" $strDelFile ="$strBackupDrive\Logs\"+ $date + "_deleted-files.txt" $shortCopyFile = "$strBackupDrive\"+ $date + "_copied.log" $shortDelFile = "$strBackupDrive\"+ $date + "_deleted.log" $index = "$strLogDrive\index.html" Write-Host -ForegroundColor Red -BackgroundColor Black "Logfiles defined" #F_Folders # Here you place the folder which u want to backup. # Syntax => $variable = ("pathtofile"); $strDataFolder = ("C:\Users\ADMIN\Documents"); $strPictureFolder = ("C:\Users\ADMIN\Pictures"); Write-Host -ForegroundColor Red -BackgroundColor Black "Backup Folder defined" #F_SetBackup # Here we defined the "FROM & TO" stuff # Always be sure the folders are in the same Order. FromFolder 1 should be the same as ToFolder 1 $argsFromFolders = ( "$strDataFolder", "$strPictureFolder"); $argsToFolders = ( "$strBackupDrive\$date\DATA", "$strBackupDrive\$date\Pictures",); Write-Host -ForegroundColor Red -BackgroundColor Black "Arguments defined" Start-SleepProgress -Seconds 5 clear #endregion ############################################################################################################################################################## ## ## ## ## ## ## Make Backup ## Make Backup ## Make Backup ## Make Backup ## ## ## ## ## ## ############################################################################################################################################################## #region Backup #F_OldBackup # here we delete the old backup if (Test-Path "$strBackupDrive\$DatetoDelete") { robocopy $noFiles "$strBackupDrive\$DateToDelete" /MIR } else { Write-Host -ForegroundColor Cyan "No Backup found.. Continuing now" } #F_NewBackup # here we create the new backup, and create the logfile For ($i=0; $i -lt $argsFromFolders.Length; $i++) { robocopy $argsFromFolders[$i] $argsToFolders[$i] *.* /MIR /MT:8 /w:0 /r:1 /TEE /NP /NDL /DCOPY:T /UNILOG:$strLogfile gc $strLogFile | Out-File $strLogFile1 -Append gc $strLogFile | select -first 15 | Out-File $shortCopyFile -Append gc $strLogFile | select -last 10 | Out-File $shortCopyFile -Append Write-Host -ForegroundColor Cyan "Log Edited" } #endregion ########################################################################################################################################################## ## ## ## ## ## ## LOG FILE ## LOG FILE ## LOG FILE ## LOG FILE ## ## ## ## ## ## ########################################################################################################################################################## #region Logfile #F_CreateLog # this is just to get an HTML Index file with the link to the Logfiles so u get an overview of the backups. # if the backup is older than 7 days, the log file is still here but the files arent :P cat "$strBackupDrive\$date*.log" | sc $strBackupDrive\$date\overview.txt Write-Host -ForegroundColor Cyan "Logfiles merged" $cont = "<font face='monospace'>$(Get-Content $strBackupDrive\$date\overview.txt | ForEach-Object {"$($_ -replace '\s',' ') <br/>"})</font>" ConvertTo-Html -Title "Robocopy Backup" -Body $cont | Out-File $strLogPath\$date.small.html Write-Host -ForegroundColor Cyan "Backup Summary Created" $cont = "<font face='monospace'>$(Get-Content $strLogFile1 | ForEach-Object {"$($_ -replace '\s',' ') <br/>"})</font>" ConvertTo-Html -Title "Robocopy Backup" -Body $cont | Out-File $strLogPath\$date.big.html Write-Host -ForegroundColor Cyan "Full Backup Log Created" Add-Content -path $index -value "`r`n<a href=`"day/$date.small.html`">`&Uuml`;bersicht vom Daily Backup ( $date )</a>`&nbsp`;`&nbsp`;`&nbsp`;`&nbsp`;`&nbsp`;`&nbsp`;<a href=`"day/$date.big.html`">Ganzer Log vom Daily Backup ( $date )</a><br/>" Write-Host -ForegroundColor Cyan "Index up-2-date ($date)" #Old_Files # and here we delete the old folder and the temp logfiles if (Test-Path "$strBackupDrive") { Remove-Item "$strBackupDrive\$DatetoDelete" -ErrorAction Ignore Remove-Item "$strBackupDrive\$date*.log" -ErrorAction Ignore Write-Host -ForegroundColor Cyan "Files Deleted" } else { Write-Host -ForegroundColor Cyan "No Logs found.. Continuing now" } #endregion

About Us

We are glad you decided to stop by our website and servers. At Fearless Assassins Gaming Community (=F|A=) we strive to bring you the best gaming experience possible. With helpful admins, custom maps and good server regulars your gaming experience should be grand! We love to have fun by playing online games especially W:ET, Call of Duty Series, Counter Strike: Series, Minecraft, Insurgency, DOI, TF2 & Battlefield Series and if you like to do same then join us! Here, you can make worldwide friends while enjoying the game. Anyone from any race and country speaking any language can join our Discord and gaming servers. We have clan members from US, Canada, Europe, Sri Lanka, India, Japan, Australia, Brazil, UK, Austria, Poland, Finland and many other countries. It doesn't matter how much good you are in the game or how much good English you speak. We believe in making new friends from all over the world. If you want to have fun and want to make new friends join up our gaming servers and our VoIP servers any day and at any time. .

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.