troubleshooting Question

Powershell script to FTP recent files.

Avatar of EdlenIT
EdlenIT asked on
PowershellShell Scripting
1 Comment1 Solution1308 ViewsLast Modified:
Hello all,

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\
\\servername\c$\database backups\differtials\
\\servername\c$\database backups\translogs\

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.
ASKER CERTIFIED SOLUTION
AlexPace

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros