Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I currently have a web server with Centos running Apache and MySQL. I am looking for a simple way I can backup certain files back to my house where I have a exernal HDD. I currently have 4 HDD's in the server and they are mirrored 2 by 2 so im not worried on that note. Although I would like to have a way to auto backup certain files to my house ever so often, say every night at 2am. Is there a way for me to accomplish this. I currently access the server remotely via SSH. I have found a ton of information on how to backup the data to another server or seperate destination using an address but being that I do not have a static IP for my home I wasn't sure 1 how to go about doing that and 2 what type of script if possible or software I could use to make this possible. I use ubuntu on my home computer and also osx on my laptop if that helps narrow the scope a bit. As always thanks for the help.

share|improve this question

migrated from stackoverflow.com Jan 9 '12 at 18:07

This question came from our site for professional and enthusiast programmers.

add comment

3 Answers

up vote 0 down vote accepted

You'll want to run the script (via cron, most likely) on your home machine, as you should be able to reach the server from there more easily than the reverse.

As far as the actual mirroring, I could tell you how to pull everything with scp, but I believe you should look at rsync instead; as I understand, it was made for this sort of nightly backup.

share|improve this answer
add comment

You can use DynamicDNS at home to be able to have a fixed dns address for a dynamic ip address. Checkout DynDNS or No-ip for free ddns solutions.

Once you have a dns name for your home computer you can then just scp your data from the web server to the home computer.

share|improve this answer
add comment

Is it work related data? I would suggested using an online backup system that has a linux client available. Storing work related data may pose problems for you in the future (if your house gets robbed and the hard drives stolen, it's your fault). It's relatively cheap.

If none of that matters, then I would suggest doing what Alex says, but in the opposite direction. If the web server has a public IP address, then create a script on your home computer that pulls that data every night using a cronjob. No need to mess around with dynamic dns crap.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.