New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
Right. You need to backup the database too.
There are even plugins for that. Here is (just) an example:
https://de.wordpress.org/plugins/wp-db-backup/
You can use this : https://wordpress.org/plugins/updraftplus/
mysqldump the database
tar the folder
done
I use automysqlbackup (VERY easy to install) which backups all my Wordpress databases daily, weekly, and monthly and saves them to a folder and then I have that folder rsynced over to my backup server.
apt-get install automysqlbackup
nano /etc/default/automysqlbackup (and choose where you want the databases saved to, default is /var/lib/automysqlbackup, and put your email address where you want any notices sent to)
or manually backup using mysqldump:
mysqldump -u root -p database_name > dumpfilename.sql
and to restore it:
mysql -u root -p database_name < dumpfilename.sql
and to dump ALL databases:
mysqldump -u root -p --all-databases > all-database.sql
Plugins are good, but what is doesn't work.
I would go for the old school style with cronjobs. This onyl works if you have access to the server.
Is almost the same @4n0nx wrote.
!#!/bin/bash
date=$(date +%Y%m%d%H%M)
mysqldump -u "user" -h "hostname" -p "password" > wpdb.$date.sql
Don't use backup plugins, or if you do test them lots!
I've always had issues restoring blogs that use backup plugins, and they never get everything right.
You can never beat a mysql dump and zip of httpd directory...
I never do backup, you can always blame the provider trololol
I have cron backup all files and database to another vps. I tried some/most wordpress backup plugins, most of them work ok (ftp), but they are somewhat hard to restore later because the way they backup files.
create a script yourself then run cron daily or whatever, much better than plugins.