Posted On March 31, 2019

Web Server Files and mySQL backup and restore

kimconnect 0 comments
blog.KimConnect.com >> Codes , Database >> Web Server Files and mySQL backup and restore
Backup:
mysqldump -u [username] -p [password] [databasename] > /home/shares/backup_db.sql
 
Restore:
mysql -u root -p sexcenter < /home/www/sexcenter/dump/g2_Entity_Original.sql
 
setup Cron Job:
# crontab -e
———-
@midnight /usr/bin/mysqldump –user=root –password=horse78 –all-databases > /home/alldatabases.sql

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Harden Windows Server 2016

# IE Enhanced Security:$AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}"$UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}"    Set-ItemProperty -Path…

PowerShell: Get Windows OS Name

function getOsBuild($computername=$env:computername){ $build="" $pingable=test-connection $computername -Count 1 -Quiet if($pingable){ $psinfoIsAvailable=get-command psinfo -ea SilentlyContinue # Requires…

PowerShell: Windows 10 Cleanup

Update: there's a new script to cleanup windows here. function cleanWindows{ write-host 'Disabling Windows Media…