I am extremely new to Powershell so any help would be greatly appreciated!
Our SQL DB server is hosted. I need to copy the .bak files for the SQL weekly backup, differential backup and transaction log backups to another offsite location via FTP.
The source folder is:
\\servername\c$\database backups\daily backups\
Because the full backups happen every Friday evening and are pruned every 3 weeks, I only want to copy the most recent Friday's backup. I'd like the backup to run Saturday morning.
Because the diffs and the trn logs backups run constantly I'd like to also copy only the previous date's files. I'd like to run these every morning between 12am and 2am.
Can someone please assist?
Thank you all in advance.