View Single Post
Old 04-07-2024, 03:24 AM  
HostedinVegas
Confirmed User
 
Industry Role:
Join Date: Feb 2011
Posts: 110
Create a .bat file, and have it run at X time, on X day and such.

## Example ##

Quote:
Compress-Archive -LiteralPath 'C:\Users\yourusername\Documents' -DestinationPath "C:\Users\yourusername\Backups\backup-Documents-$(get-date -f yyyy-MM-dd).zip"
robocopy C:\Users\yourusername\Backups W:\backups /M /XA:H /W:0 /R:1 /REG
del C:\Users\yourusername\Backups\*.zip
## Explained

Line One:
This is not needed but I personally use it, this created a zip file of directly and everything inside of it in your source, then it drops that zip file in the folder of your secondary location, with the date in the name
** Make the destination folder different from your source!
Line Two: this is the copy command from the command line that copies everything in the source to the destination, the flags after it are what your looking for.
Read More: https://theserveradmin.com/robocopy-explained/

Line Three: Delete the created *.zip file in the source folder, not needed but I used this so I don't have a ton of backup zips created.

Hope this helps.
HostedinVegas is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote