Jump to content
MakeWebGames

Site backups a quicker way.


rulerofzu
 Share

Recommended Posts

If you have cPanel, you can export your database into an SQL file, which is suitable for many on here.

With your files, you could manually do a differential backup, buy either downloading the files direct, or using file manager compress feature.

However, good post ROZ. I do believe cpanel (the only interface I've interacted with (sadly) does compress your data into *.tar.gzip with the site backup feature :)

Link to comment
Share on other sites

Problem with direct download of your database is if your host has the default setting for php uploads or less then you can get stuck trying to upload the backup if its bigger than 2048kb. You could compress it on your computer though.

The use of pigz among other similiar multi thread compression is on the cPanel to do list. One will be chosen and implemented for site backups until then you can do it manually if you wish. Personally I dislike the cPanel site backup system.

Link to comment
Share on other sites

I don't know of anyone who "back up" their website's files.

VCS is much better, although I have to state, it's not a "backup" utility, it's for version control.

It does however, allow you to have the logic behind your website(s) at multiple locations - this could be for redundancy or just keeping things organized.

# on server
cd /var/www/game; git init
# on client
git clone mywebsite.com:/var/www/game

 

Data is another story, this can be anything from MySQL databases to pdf documents.

For MySQL, I would suggest using a simple mysqldump and transferring it to a remote location every day or so.

When you have larger databases or need a higher degree of redundancy than restoring backups, you can start to look into replication, or even creating clusters.

mysqldump -uroot -p --opt --all-databases | gzip -c > /var/backup/db.sql.gz

 

For physical files, most hosts will provide a few gigabytes of space on a backup server somewhere.

Transferring essential files to the backup server can be done with rsync, if needed. When scaling, a SAN should be considered if you work with a lot of high-demand files.

Link to comment
Share on other sites

If you have a production server there is no way I would install anything other than what is required to run your site and thats it. Everything else is a security risk regardless of the vendor which includes git.

Development account/server vps yeah for sure version control is a much better way to work. Rather not go with git myself dont like it never have and probably never will.

It really does depend on your requirements, limitations and method of working. Shared hosting users can use gzip and automate it with a cron or ask them to install a multithread replacement to speed up the back up process which is really what ive outlined here. Pigz is one of several options available.

Not all companies provide rsync some only provide a internal transfer in which case you need to create the backup yourself. Backing up files has after all made rsync what it is today so you may not know of anyone that back up their files but obviously it does happen a lot.

Link to comment
Share on other sites

If you have a production server there is no way I would install anything other than what is required to run your site and thats it. Everything else is a security risk regardless of the vendor which includes git.

You've never really touched a production server of any kind, right?

Well, on app servers, you're likely to find a ****-house of different applications: some custom built, some ripped off other applications, and some applications no-one has ever heard of but is there because of some reason Joe(who now left the company) knew at a stage.

Most of these things are binded to file-system sockets, if needed. Everything else is behind a firewall.

There are proper ways of dealing with security, and then there's the iptables -P INPUT DROP.

Take git for instance.

You have a several developers working on code, and without VCS you're pretty much screwed right away.

Now, what normally happens is the branch maintainer(integrator) takes someone's changes(cherry-picking), and merges it into a main development branch, and after testing one of the production branches. The changes are then "pulled" onto the production server.

This is [simpler version of] a trusted chain of responsibility used by thousands of developers world wide.

Not having VCS is a security risk on it's own if you ask me.

P.S.: git is submissive, and works over SSH(or HTTP).

Edited by Spudinski
Link to comment
Share on other sites

You've never really touched a production server of any kind, right?

Well, on app servers, you're likely to find a ****-house of different applications: some custom built, some ripped off other applications, and some applications no-one has ever heard of but is there because of some reason Joe(who now left the company) knew at a stage.

Most of these things are binded to file-system sockets, if needed. Everything else is behind a firewall.

There are proper ways of dealing with security, and then there's the iptables -P INPUT DROP.

Take git for instance.

You have a several developers working on code, and without VCS you're pretty much screwed right away.

Now, what normally happens is the branch maintainer(integrator) takes someone's changes(cherry-picking), and merges it into a main development branch, and after testing one of the production branches. The changes are then "pulled" onto the production server.

This is [simpler version of] a trusted chain of responsibility used by thousands of developers world wide.

Not having VCS is a security risk on it's own if you ask me.

P.S.: git is submissive, and works over SSH(or HTTP).

 

Lets see

Started with Cobalt Raq 4's , windows and pretty much all uni* versions and I am regularly employed to setup servers so they are done the correct way. How about you ?

App servers....so I stated "other than what is required".....so if your server required a custom app then that would be installed as it is needed yes? Kinda logical.

As for Joe. If you have people working for you that can do that and have done that well you deserve everthing you get. Chain of command has been in place a long time and there is a good reason for it.

I could quote a whole series of ways of "how" you can setup your company servers with different levels of software and hardware for security and methods of working however 99% of them are not practical for here MWG.

I dont see any point in refering to high end setups when nobody here is going to ever require it.

Git....still dont like it I prefer subversion.

Link to comment
Share on other sites

I don't even see a reason to backup my file's if i have Version Control, where beanstalk store's a backup for me, and I can access it when ever I want.

Also, there are many good solutions to database backup's that can be useful for a large user base.

This was really directed to the 99% of MWG users who use shared hosting. Most can barely run crons never mind version control.

I wouldnt want them to lose their stuff from lets say a hard drive fail.

Link to comment
Share on other sites

Lets see

Started with Cobalt Raq 4's , windows and pretty much all uni* versions and I am regularly employed to setup servers so they are done the correct way. How about you ?

App servers....so I stated "other than what is required".....so if your server required a custom app then that would be installed as it is needed yes? Kinda logical.

As for Joe. If you have people working for you that can do that and have done that well you deserve everthing you get. Chain of command has been in place a long time and there is a good reason for it.

I could quote a whole series of ways of "how" you can setup your company servers with different levels of software and hardware for security and methods of working however 99% of them are not practical for here MWG.

I dont see any point in refering to high end setups when nobody here is going to ever require it.

Git....still dont like it I prefer subversion.

Well, since the wild-card is in the wrong place, I'll take your acclaimed experience with a pinch of salt.

Unless that is, "all uni[sexual] versions", which I don't know anything about, sorry, I tend to stick with my conservative views.

I don't think you truly understand version control, but everyone has their opinions.

The whole point of VCS is to have a distributed work-flow, which really stands opposed to your statement: "I wouldnt want them to lose their stuff from lets say a hard drive fail."

Would you care to explain this statement?

Link to comment
Share on other sites

All versions of unix are sexy but I didnt pay that much attention at 7:43am

My point is.....there is many who do not use version control. Cannot use version control for whatever reason and have not even heard of version control so they tend to rely on control panel backups of their site and database. I was pointing out a quicker way to do it as more than likely they are on a server with a multi core and/or cpu available.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...