GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Tech Wordpress sites backups (https://gfy.com/showthread.php?t=1220182)

Denny 10-05-2016 11:31 AM

Wordpress sites backups
 
Guys, I have a network of about 80 WP sites spread over 10 different hosts. What would be the best way to backup them (files+DBs) regularly? Doing it manually is a pain.

Thanks for your advices.

lordaRaG0n 10-05-2016 01:07 PM

I'm using InfiniteWP to manage the Wordpress sites in bulk and it also has backup features.

just a punk 10-05-2016 01:12 PM

WP-DBManager WordPress Plugins

robwod 10-05-2016 01:23 PM

Denny, the easiest, most reliable way to do this is via simple automation.
  1. Create a folder on your server called "backups".
  2. If you have bash/shell access, create a simple text file and name it backups.sh
  3. In this file, use mysqldump to dump all of your databases to sql files. Also, you can add tar commands to backup each domain's files as well.
  4. Upload this file, backups.sh to your server and then set a cron job to execute this file every night.
  5. Use rsync to sftp to them any server you want, or even to connect to your own home cloud drive, such as WDMyCloud or your own home ftp server.
If you do not have the ability to create a bash file, then you can do it all via a series of cronjobs, though that's a little less efficient I think.

If you don't know how to do this type of thing, just shoot me a PM and I can explain it in detail specific to your needs.

HostedinVegas 10-05-2016 02:22 PM

Another plugin that is both free and paid is UpdraftPlus, it allows you to backup to like 15 different backup/storage options, plus it allows you to send the backups several different ones for double/triple the backups.

TheDA 10-05-2016 03:40 PM

Quote:

Originally Posted by HostedinVegas (Post 21202252)
Another plugin that is both free and paid is UpdraftPlus, it allows you to backup to like 15 different backup/storage options, plus it allows you to send the backups several different ones for double/triple the backups.

:thumbsup:thumbsup

hdbuilder 10-05-2016 04:38 PM

Yeah me too I use WP-DBManager WordPress Plugins, it can send the backup to your email too...

myleene 10-05-2016 06:33 PM

Quote:

Originally Posted by robwod (Post 21202180)
Denny, the easiest, most reliable way to do this is via simple automation.
  1. Create a folder on your server called "backups".
  2. If you have bash/shell access, create a simple text file and name it backups.sh
  3. In this file, use mysqldump to dump all of your databases to sql files. Also, you can add tar commands to backup each domain's files as well.
  4. Upload this file, backups.sh to your server and then set a cron job to execute this file every night.
  5. Use rsync to sftp to them any server you want, or even to connect to your own home cloud drive, such as WDMyCloud or your own home ftp server.
If you do not have the ability to create a bash file, then you can do it all via a series of cronjobs, though that's a little less efficient I think.

If you don't know how to do this type of thing, just shoot me a PM and I can explain it in detail specific to your needs.

+1

A remote server with OpenStack is perfect for this.

That's what I have. Once setup and tested (untested backups aren't better than bricks), It's awesome.

Denny 10-06-2016 04:30 AM

Thanks guys :thumbsup

avx 10-06-2016 05:10 AM

Quote:

Originally Posted by HostedinVegas (Post 21202252)
Another plugin that is both free and paid is UpdraftPlus, it allows you to backup to like 15 different backup/storage options, plus it allows you to send the backups several different ones for double/triple the backups.

I use UpdraftPlus too, great plugin. You can schedule backups every 4, 8, 12, daily, weekly or monthly backups. You may back up DB and files separatly + nice other features and that's only the free version.

druid66 10-06-2016 07:36 AM

Quote:

Originally Posted by CyberSEO (Post 21202162)

does it backup everything, like html/php structure of the site + all posts, images on the galleries, tags, categories?
so for example i can ftp upload backup on fresh domain and have my old site with all goodies running?

HowlingWulf 10-06-2016 09:10 AM

I use an FTP program that I can script automatic backups over any number of servers and sites.

MakeMeGrrrrowl 10-06-2016 09:26 AM

Quote:

Originally Posted by avx (Post 21203146)
I use UpdraftPlus too, great plugin. You can schedule backups every 4, 8, 12, daily, weekly or monthly backups. You may back up DB and files separatly + nice other features and that's only the free version.

I third this option.

robwod 10-06-2016 10:41 AM

The problem with plugins is that they create a dependency on a third party -- OFTEN by authors doing it for a hobby or for free. And then you now rely said third party author to keep their plugins current. Plugins are likely the #1 reason for problems with Wordpress sites during an upgrade, themes are probably second. Not to mention that every plugin you use -- even those not activated -- add to a server overhead and external calls (such as checking them for upgrades).

Thus, for anyone with the ability to do so, removing as much reliance on third parties to make your site work is not a bad thing. Certainly for something as simple as backups, database dumps, and rsyncs, using native command line tools like tar, mysqldump, and shell ftp, would be more efficient overall.

just a punk 10-06-2016 11:10 AM

Quote:

Originally Posted by druid66 (Post 21203392)
does it backup everything, like html/php structure of the site + all posts, images on the galleries, tags, categories?
so for example i can ftp upload backup on fresh domain and have my old site with all goodies running?

It backups MySQL databases only (all posts, pages and the whole site structure). It does not backup any files however (e.g. images, videos etc).

j3rkules 10-06-2016 11:53 AM

I am using WP-DBManager plugin. Works flawlessly.

druid66 10-06-2016 12:05 PM

Quote:

Originally Posted by CyberSEO (Post 21203923)
It backups MySQL databases only (all posts, pages and the whole site structure). It does not backup any files however (e.g. images, videos etc).

Thanks Cyber, can you advice me how to backup whole site with images from galleries as well in maximum easy way?

just a punk 10-06-2016 12:34 PM

Quote:

Originally Posted by druid66 (Post 21204070)
Thanks Cyber, can you advice me how to backup whole site with images from galleries as well in maximum easy way?

I don't know about a universal solution. I do backup databases and files with separate scripts. Actually it's not a big deal to write a script which will do both things simultaneously and perhaps it already exists somewhere..

robwod 10-06-2016 02:02 PM

Quote:

Originally Posted by CyberSEO (Post 21204133)
I don't know about a universal solution. I do backup databases and files with separate scripts. Actually it's not a big deal to write a script which will do both things simultaneously and perhaps it already exists somewhere..

Yes, a simple bash script. In a simple text editor, a person could enter the following and save it as backups.sh

Code:

# ##########################################################
# DUMP DATABASE(S)
# ##########################################################

mysqldump --user=root --password='whatever' --host=localhost databasename > databasename.sql

# ##########################################################
# TAR WEBSITE(S)
# ##########################################################

tar -cpf domainname.tar /path/to/domainname.com

# ##########################################################
# MOVE FILES TO BACKUP FOLDER
# ##########################################################

mv databasename.sql /path/to/backups/
mv domainnanme.tar /path/to/backups/

You could of course, dump/tar and move at one time, but this just explains it relatively easy.

All one needs to do then is to add a cron job to execute backups.sh nightly.

Code:

0 0 * * * /bin/bash /path/to/backups.sh > /dev/null
That's it, now your databases and all files for the specified domain are backed up every night at midnight. If you want to store them on a separate server, rsync will let you connect to any of your other hosts and you can transfer them in similar fashion, through a simple bash script and a cronjob.

And these command line instructions remove any dependency on a third party plugin and are included with any basic *nix server.

rastan 10-06-2016 03:45 PM

Quote:

Originally Posted by HostedinVegas (Post 21202252)
Another plugin that is both free and paid is UpdraftPlus, it allows you to backup to like 15 different backup/storage options, plus it allows you to send the backups several different ones for double/triple the backups.

^^^ This. Excellent tool

Kafka 10-06-2016 03:45 PM

Quote:

Originally Posted by robwod (Post 21204286)
Yes, a simple bash script. In a simple text editor, a person could enter the following and save it as backups.sh

Code:

# ##########################################################
# DUMP DATABASE(S)
# ##########################################################

mysqldump --user=root --password='whatever' --host=localhost databasename > databasename.sql

# ##########################################################
# TAR WEBSITE(S)
# ##########################################################

tar -cpf domainname.tar /path/to/domainname.com

# ##########################################################
# MOVE FILES TO BACKUP FOLDER
# ##########################################################

mv databasename.sql /path/to/backups/
mv domainnanme.tar /path/to/backups/

You could of course, dump/tar and move at one time, but this just explains it relatively easy.

All one needs to do then is to add a cron job to execute backups.sh nightly.

Code:

0 0 * * * /bin/bash /path/to/backups.sh > /dev/null
That's it, now your databases and all files for the specified domain are backed up every night at midnight. If you want to store them on a separate server, rsync will let you connect to any of your other hosts and you can transfer them in similar fashion, through a simple bash script and a cronjob.

And these command line instructions remove any dependency on a third party plugin and are included with any basic *nix server.

The user should not be root but the user who is admin of that particular database.

robwod 10-06-2016 05:10 PM

Quote:

Originally Posted by Kafka (Post 21204490)
The user should not be root but the user who is admin of that particular database.

Good catch.


All times are GMT -7. The time now is 02:43 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc