MyBB Community Forums

Full Version: how to properly backup
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi I backup via cpanel and save the contents to my computer almost daily or every several days.

should I save the backups else ware? plus is it okay to delete old backups after I download new backups?

Also is r1 soft restore on cpanel sufficient.



-thx
Hosting plan may determine what resources you have available to you. I am hosted by 1and1 on a reseller plan, chosen for their feature list including bandwidth, storage and database. There may be other suitable host plans.

The most important component is the database. I use a crontab script run at 4 a.m. daily to make a database backup on the server.

mysqldump -h dbURL -uUsername -pPassword dbname > ~/database/filename-$(date +%Y-%m-%d).sql

Drawback to this method is the password is in the script, offset by the host directory is reasonably secure.

Periodically, I manually download the database backup and changed Upload folders to local storage with FTP client. My webhost makes regular backups as part of the hosting package, but my manual efforts back up the backup. The most I would lose in the event of a catastrophe is 1 or 2 days depending on how diligent I am at 5a.m.
(2017-03-22, 12:27 PM)HLFadmin Wrote: [ -> ]Hosting plan may determine what resources you have available to you. I am hosted by 1and1 on a reseller plan, chosen for their feature list including bandwidth, storage and database. There may be other suitable host plans.

The most important component is the database. I use a crontab script run at 4 a.m. daily to make a database backup on the server.

mysqldump -h dbURL -uUsername -pPassword dbname > ~/database/filename-$(date +%Y-%m-%d).sql

Drawback to this method is the password is in the script, offset by the host directory is reasonably secure.

Periodically, I manually download the database backup and changed Upload folders to local storage with FTP client. My webhost makes regular backups as part of the hosting package, but my manual efforts back up the backup. The most I would lose in the event of a catastrophe is 1 or 2 days depending on how diligent I am at 5a.m.

well my host does do some backups for me but I can't be totally dependant on my host in case an issue happens on their end. Should I save

my backups on dropbox or a similar site?

just in case my computer breaks and I need a backup what do I do? I CANNOT afford an external hard drive unfortunately Sad

also how do I scan just my files for malware that I backed up? I only have a avast currently

thx Smile
Quote:well my host does do some backups for me but I can't be totally dependant on my host in case an issue happens on their end
I dont know what host you have that you cannot trust their backup systems? It must be crappy if you cannot trust them. Use a good host in which has things like generators/water turbines to power servers in case their power goes out for example. 

I use digital ocean to serve my site. And make snapshots of the entire server usually twice a day. I use do_snapshot on my local machine to make a new snapshot and delete specified X number of old ones via command line. You dont need the host password or login credentials as you use an access token instead. This way if the access token gets compromised, you just delete it and create a new one and update your do_snapshot token. Then i use a python script to automate the process twice a day...or you can use a cron job. 

This method already saved our site before. About two months after creating our server our site was hacked and hijacked wanting money to reinstate the content of the server. I just deleted the droplet and reloaded an older snapshot to go "back in time" then patched the back door they used to get in.

Note this backs up everything on the server, not just the database.

There are also some MyBB methods to tighten up security on their end.
https://docs.mybb.com/1.8/administration...rotection/
(2017-03-25, 09:13 PM)metulburr Wrote: [ -> ]
Quote:well my host does do some backups for me but I can't be totally dependant on my host in case an issue happens on their end
I dont know what host you have that you cannot trust their backup systems? It must be crappy if you cannot trust them. Use a good host in which has things like generators/water turbines to power servers in case their power goes out for example. 

I use digital ocean to serve my site. And make snapshots of the entire server usually twice a day. I use do_snapshot on my local machine to make a new snapshot and delete specified X number of old ones via command line. You dont need the host password or login credentials as you use an access token instead. This way if the access token gets compromised, you just delete it and create a new one and update your do_snapshot token. Then i use a python script to automate the process twice a day...or you can use a cron job. 

This method already saved our site before. About two months after creating our server our site was hacked and hijacked wanting money to reinstate the content of the server. I just deleted the droplet and reloaded an older snapshot to go "back in time" then patched the back door they used to get in.

Note this backs up everything on the server, not just the database.

There are also some MyBB methods to tighten up security on their end.
https://docs.mybb.com/1.8/administration...rotection/

My host is a wonderful host very reliable in fact I accidentally deleted my site and restored it with the r1 soft restore from a few weeks ago so my host IS DEPENDABLE its just I don't want to 100% depend on them in case something goes wrong I am still new to this so I do not know how to use do_snapshot. Is there an easier way to do this where I can store my backups on dropbox or are there any cheap reliable external hardrives?

thx Smile
well if you can trust them then you can trust them to backup your site content.

do_snapshot is only for digital ocean and making server backups. And i would say it only sounds complex because its unknown to you. Manually coping the database and sticking it in your dropbox is much more work than running do_snapshot for example. Its as simple as hitting up to get the last command, and hitting enter to re-execute the do_snapshot command....and its done. 

Also then you are relying on dropbox servers instead of your host servers. Its the same thing. One is not more secure than the other.
(2017-03-26, 05:26 PM)metulburr Wrote: [ -> ]well if you can trust them then you can trust them to backup your site content.

do_snapshot is only for digital ocean and making server backups. And i would say it only sounds complex because its unknown to you. Manually coping the database and sticking it in your dropbox is much more work than running do_snapshot for example. Its as simple as hitting up to get the last command, and hitting enter to re-execute the do_snapshot command....and its done. 

Also then you are relying on dropbox servers instead of your host servers. Its the same thing. One is not more secure than the other.

I WILL try snapshots but for now i'll try dropbox.

how would I use dropbox for backups?

plus know of any cheap reliable external hard drives that work for mac and windows?

thx Smile
https://www.dropboxforum.com/t5/Installa...d-p/123439

Like they said Carbonite would be better, but whats the point of paying for that when you can do it for a 10 cents a month on a snapshot backup? IT actually use to be free before october 2016 unfortunately.

The problem with dropbox is every single post, attachment, shout, PM read/unread counters, triggers a sync. Your bandwidth would be strained. Its a little excessive to update more than once every 4 hours unless you are facebook or similar.
(2017-03-26, 08:47 PM)metulburr Wrote: [ -> ]https://www.dropboxforum.com/t5/Installa...d-p/123439

Like they said Carbonite would be better, but whats the point of paying for that when you can do it for a 10 cents a month on a snapshot backup? IT actually use to be free before october 2016 unfortunately.

The problem with dropbox is every single post, attachment, shout, PM read/unread counters, triggers a sync. Your bandwidth would be strained. Its a little excessive to update more than once every 4 hours unless you are facebook or similar.

Ok what about an external hard drive then. What I am thinking of doing is I store my files on my computer but then on an external hard drive in addition. I can figure out and additional remote method later but would you know of any external hardrives for both mac and windows that are in the $30-$50 u.s dollars range?

thx Smile