Backing Up Files and MySQL Databases on Linux Servers

You’d think I’d have this memorized by now, but I always mess up the syntax and have to spend a few minutes digging through man pages or wading through search results to find it.

tar -czf [output-file.tar.gz] [input-directory]/
mysqldump -u [username] -p [database name] > [filename]

Leave a Reply

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