MySQL Forums
Forum List  »  Backup

MySql 8.0 Restore
Posted by: Stefano Landa
Date: August 18, 2020 01:31AM

I need create a script on powershell, twice on a day, restore production schema dump on test schema. I would like to take last dump created for restore operation

I've writed this
`$DumpPath ="C:\XXX\XXX"
$FileExt = "*.sql"

Get-ChildItem $DumpPath""$FileExt | Where-Object {$_.LastWriteTime} | Select-Object -Last 1 | mysql --batch --login-path=remote --defaults-extra-file="C:\XXX\XXX\AppData\Roaming\MySQL.mylogin.cnf" testschema`

It's correct or i'm completely full of?

Thanks

Options: ReplyQuote


Subject
Views
Written By
Posted
MySql 8.0 Restore
862
August 18, 2020 01:31AM
447
August 18, 2020 11:11AM
446
August 19, 2020 08:42AM
451
August 19, 2020 10:23AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.