How to take daily website backup?

Hi,

I am fairly new to web-development.

I would like to know following:

(a) At what intervals should site backup be taken?

(b) By site backup, I believe we are talking about database backup right?

(c) How to do database backup...and how to restore it if site is not hosted on dedicated server...i.e. you are hosting it on some commercial web-host?
meetpdAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

techExtremeCommented:
Well there are number of possibilities depending upon your web host and functionalities provided by them.
For example, if they allow you to take your db backup online through their cpanel or something, you'll have to do it manually.
If you are using database in asp.net site like aspnet mdf  inside the app_data folder, you can through your code copy the file at regular intervals in appropriate location or something like that for backup purposes.
0
meetpdAuthor Commented:
I dont see app_data folder on my webserver. Where is it located?
0
techExtremeCommented:
If your site is created using asp.net and if you are using the aspnet inbuilt database (the mdf file basically), then it must be there in the app_data folder inside your root. i.e. if your while site is in a folder say 'html',  then the app_data folder will be under html as well.

Kindly confirm what type of database you are using.
If you are using for example godaddy.com, then they provide database services wherein you need not to use such database, instead database is created using your username and is stored in a different place. So it depends on the host/ t ype of hosting that you buy.
0
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

OnthraxCommented:
(a) At what intervals should site backup be taken?

This would be at your own disgression and is also dependant on the update interval. If the database only gets updated once a week, you shouldn't backup each day, but if your database gets updated daily or even every minute you should backup every week. If you provide a little more information about the exact website we could advise better.

(b) By site backup, I believe we are talking about database backup right?
Not just the database, you'll need to backup your files as well. Not just the files that are part of the code, but also any uploads done by your users.

(c) How to do database backup...and how to restore it if site is not hosted on dedicated server...i.e. you are hosting it on some commercial web-host?
As techExtreme has already mentioned, this fully depends on the package and host you are using.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Geoff BryanDeveloperCommented:
If you are using a commercial web hosting provider, they will almost invariably backup all your web site files and any SQL databases automatically - usually at least once a day. This is for their own security as if you are paying to have your site hosted, they are responsible for ensuring that your files are safe in the event of anything happening to the hardware.

Some hosting proividers will make a charge if you ever need to restore the files, unless it is needed because of a hardware failure.

If you host a site on your own dedicated server, then you need to implement your own backup strategy for all files and databases on the server.
0
OnthraxCommented:
This is for their own security as if you are paying to have your site hosted, they are responsible for ensuring that your files are safe in the event of anything happening to the hardware.

One shouldn't assume this. There are numerous times I've heard of people losing everything because the hosting company does not create backups, or stores the backups on the same server (read: Hard Drive) as the website, so when a HD fails so will the backup.
I'm not saying all hosting company's do this, but there's loads of differences between hosters.
0
Geoff BryanDeveloperCommented:
Onthrax - agreed! You obviously need to check and check again the web host terms and conditions to ensure that backups are provided.

Having said that it is difficult to run your own backups on a shared server, other than simply copying the files within your own webspace (so on the same hard drive), which is hardly safe! You could copy over ftp to a local machine, but doing this regularly could take a long time, particulalrly where you end up with large database files (most providers store SQL databases on seperate servers that you cannot access anyway so you need to rely on the hoster to back these up, unless you can copy  to a local server using DTE (for which you need the full version of SQL Server Managament Studio
0
OnthraxCommented:
There are cheaper and simpler solutions. For example KLS Backup software. This can fetch all files from an FTP and (if permitted by the host) can backup the database as well. One can set a schedule so all goes automatically.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.