• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 How to do local backup of huge forum

NeoCHI

Active member
#1
So currently my database is over 4g and when I try to back it up locally using cpanel it takes waaaay to long to download. How can I do a backup of my site outside of my server?

I've thought about using a free cloud storage but I'm not sure if that transfer would be faster either...
 

Brogan

XenForo moderator
Staff member
#2
You should be using SSH to dump a databse of that size.

Code:
mysqldump -u<user> -p --single-transaction --skip-lock-tables <db_name> > /path/to/backup/<db_name>_$(date +%d.%m.%y).sql
 

shawn

Well-known member
#3
That sounds like a job better suited to something like Percona's Xtrabackup. Use that to create the backup with no downtime, then copy the backup and any related partial/delta backups to a remote location.
 

NeoCHI

Active member
#6
No, it will just back it up to your server.

You would then need to tar it and download it.
So that's where the issue starts...I've tried something similar with my WHM's auto scheduled backup. Those files are HUGE (couple gigs) and when I try to scp it, it just takes waaay too long...
 

AndyB

Well-known member
#7
So currently my database is over 4g and when I try to back it up locally using cpanel it takes waaaay to long to download. How can I do a backup of my site outside of my server?

I've thought about using a free cloud storage but I'm not sure if that transfer would be faster either...
How many posts does your forum have?
 

Brogan

XenForo moderator
Staff member
#8
If you use standard MySQL search (you don't have ES installed), dump it without the search_index table then rebuild the search index on your localhost.
 

AndyB

Well-known member
#10
I have 1.3 million posts and my database backup is 850MB.

One thing I suggest is to purchase Enhanced Search so you can empty your xf_search_index, that will reduce the size of your backup considerably. Transferring 850MB from my server to my house takes only a few minutes. However I have two hard disks in my server and I set up a Cron to copy the backup to the spare server every day.
 

MattW

Well-known member
#11
If it's slow to your house to take an offsite backup, then I'd recommend looking into an offsite solution like Backupsy.
 

AndyB

Well-known member
#13
This maybe the solution I need. I think it's slow mainly cause my server is located in the US and I'm now located in China.
You can also ask your web hosting company how much it would cost a month for them to provide a backup storage disk that you can copy to.