mcooper13
asked on
Copy selected backup file to another drive
My backup application outputs a file called servername_YYYY_MM_DD_HH_M M_SS with each backup job run.
I wish to automate copying this file to another drive for offsite storage purposes. Since there will be multiple backup files of this server by date/time what script can I use to select the last, or most recent backup file to copy?
I wish to automate copying this file to another drive for offsite storage purposes. Since there will be multiple backup files of this server by date/time what script can I use to select the last, or most recent backup file to copy?
ASKER
What would be the best way to schedule PowerShell script to run daily? Task scheduler?
Yes, task scheduler is a good choice.
Just to be pedantic, that script doesnt do what you expect, it is using the last write time (not sure if thats "created date-time" or "modified date-time") from the file metadata, not selecting by filename.
ASKER
To clarify, the drive that stores the daily backup files for server1 will also have backup files for server2, 3, etc. so good point. The file name does need to be part of the selection criteria.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Doh! and i didnt even get a few points for pointing out that glitch!!
Open in new window