How to Internet 101: Backups

Rule 1 about anything that touches the internet: This goes double for servers that are on all the time and configured by amateurs (you and me): KEEP BACKUPS.
Rule 2 of the internet: KEEP BACKUPS!

Always back up your data, your server configuration, and your databases. That way, when you view your site one day and discover it’s been overwritten by SEO spam selling viagra in chinese, you’ll be able to wipe it and restore.

If you’re handling customer data or people’s credit cards, you need a higher standard of security. If you are only serving content though, the easiest and best security is just keeping backups. You can always nuke it all and start over. With Linux, nuking it all and starting over is an hour exercise that doesn’t even require calling the Microsoft mothership for authentication.

backup the /etc directory (config files)
backup the /var directory (where you’ve probably put your mail and website files)
backup your /home directories

Some helpful database backup stuff for mysql:

Dumping a database to a backup file

msqldump -u username -p database_name > file.sql

Restoring a dumped database file to the database (first create the database)

mysql -u username -p database_name < file.sql

Comments (1)

  1. 3:39 am, June 12, 2020MadRocketSci  / Reply

    test comment

Leave a Reply

Allowed Tags - You may use these HTML tags and attributes in your comment.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Pingbacks (0)

› No pingbacks yet.