This will copy all files, folders, and subfolders. But if your source is a secondary drive, you’ll need to use the UNC path ( \\server\r$\), where r$ is the source drive letter.įor a one-time file or folder copy, you can run this. Note: If your source destination is the C:\ drive, you can use the folder path ( C:\users\administrator\desktop\Backup). Step 2: Create Powershell Script to Copy Folder to Google Drive Click into My Drive and create a new folder. Once downloaded, it’ll prompt you to sign in.Īfter signing in, you’ll see a new mapped drive for Google Drive and it should also be running in your taskbar. Step 1: Download Google Drive for DesktopĪssuming you already a Google account, download Google Drive for Desktop from here. So what I did was create 1 script to copy everything except the excluded folders weekly, and then created a 2nd script to copy those large folders monthly. Like I said, I have some folders on the backup array that contain large files I don’t want those uploaded to Google Drive all the time. I also like that this method lets you exclude certain folders. That means as soon as something ends up in your destination folder of Google Drive, then it immediately syncs to Google which not be ideal if a large file was just uploaded there. If you use Google Drive directly as the destination, it syncs in real-time. In addition, you can schedule how frequently you want the backup to run using a scheduled task. If you need to restore, it’s going to be faster from a local drive rather than the cloud. You could just download Google Drive for Desktop and use store you backups directly on that, but then you don’t technically have a local copy. There are a number of reasons I like using Powershell for this. Why use Powershell and not just select Google Drive as the source folder? Then, you can use Windows Task Scheduler to schedule how frequently you want the autobackup to Google Drive to run. If you want to exclude certain folders from uploaded, I’ll include steps on how to do that in the script as well. Then, create a Powershell script that uses the Copy-Item cmdlet to choose a Source and Destination folder. This maps Google Drive as a drive letter in Windows. We are downloading the Google Drive for desktop application. If you’re looking for a simple way to copy data to Google Data on a schedule with Windows 10, 11, server 2019, or server 2022, then let’s get started! This script allows me to meet the “offsite” portion of that rule. Having all backups in one location is great, but it doesn’t quite meet the 3-2-1 backup rule where you have 3 copies of your data, on 2 different mediums, with 1 copy being offsite. Everything goes to this one drive letter. On my home server, I have a storage array specifically for backups ( R:\) I use Veeam to take an image backup of my personal computer, my Home Assistant backup, Plex Metadata backups, Tautulli backups, etc. This is a great way to automate the process of moving items to the cloud for backup and retention purposes.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |