Categories
Servers Workflow

Manually Backup Site & MySQL from Command Line

(e.g. WordPress site)

Tar Gz Directory

  • Go to /var/www
  • tar -zcf ../mysite_today.tar.gz public_html
    • (-z compress; c create file; f archive file name)
    • contains public_html in archive.
  • Download with WinSCP

MySQL

mysqldump -u username -p dbname | gzip > myexport.sql.gz

Type your password. Done.