大网数据广告活动
网站运营与故障问答

Is is OK to back up a WordPress installation while it is serving content?

· 52CE 我爱测

Running a LEMP stack on Ubuntu 16.04. Found plenty of great documentation for backing up WordPress: Export your database: mysqldump --add-drop-table -h mysql_hostserver -u mysql_username -p mysql_databasename Copy the webroot whe…

问题原文

原帖链接 · Harold Fischer · CC BY-SA 3.0

Running a LEMP stack on Ubuntu 16.04. Found plenty of great documentation for backing up WordPress:

  1. Export your database:

    mysqldump --add-drop-table -h mysql_hostserver -u mysql_username -p mysql_databasename
    
  2. Copy the webroot where WordPress is located:

    cp -a /var/www/nginx/example.com/. /home/$USER/WPBackup/
    

Can I backup the MySQL database and WordPress installation safely and effectively while LEMP is serving content?

It seems like it could be a bad idea to make a backup while the database and WordPress files are being accessed.

No where in the WordPress documentation do I see a mention of whether or not it is safe to backup a WordPress installation that is serving content. If I cannot serve content while I am backing up WordPress, I may have something of a problem on my hand, as any amount of downtime is bad news for myself and the clients I host websites for.

If I backup WordPress while LEMP is serving content, will the backup of my database and/or WordPress installation risk becoming corrupted while it is being created? If so, how else could I go about backup up a WordPress installation without downtime, however little, coming into the equation?

已采纳解答

原帖链接 · JCL1178 · CC BY-SA 3.0

It should be completely safe to backup WordPress during normal operations. In fact, some of the best backups available for WordPress run live on the instance and do minute to minute backups of all changes (VaultPress and similar). Invoked backups will usually just copy the WordPress database tables and also copy the wp-content folder to the indicated destination. The only thing you may notice is some performance issues on slow/shared servers but you shouldn’t see any issues on VPS or properly configured dedicated.

tl;dr Yes, it’s safe.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2018-01-05)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。