Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to create a backup of my website for free. I just want to have a backup of my website, including not only all files and the configuration but also the databases. I mean, a full backup. If it can be done automatically, it would be better.

I use Ubuntu on my computer.

I feel there are better ways than using the cpanel to achieve that (actually, I believe sometimes web hosters does not have any cpanel).

I read the following on how to do it:

Automatically mirror the entire contents and configuration of your main server to a secondary backup server on a completely separate network in a different data centre. Use RSync, FXP, cPanel voodoo, or whatever method you wish to automate syncing.

That is why I installed Rsync Daemon which is an alternative to SSH for remote backups. I configured it but the test went wrong. The terminal is showing me this:

pablofiumara@pablofiumara-Lenovo-G470:~$ sudo rsync fiumara@pablofiumara.com::share
[sudo] password for pablofiumara: 
rsync: failed to connect to pablofiumara.com (50.87.147.75): Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(122) [Receiver=3.0.9]

pablofiumara@pablofiumara-Lenovo-G470:~$ sudo rsync fiumara@50.87.147.7::share  failed to connect to 50.87.147.7 (50.87.147.7): Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(122) [Receiver=3.0.9]

What should I do? Is there a better or easier way to achieve what I wish (I mentioned this in the first paragraph)?

share|improve this question
up vote 2 down vote accepted

Looks way over complicated.....

Assuming that your using ubuntu from the sudo commands I see in your log then I'd opt to use MySQLDUMP and Simply downloading the site using FTP.

  1. sudo mysqldump [options] --all-databases
  2. sudo tar cf file.tar /var/www/this/is/the/webhost/path
  3. Then download both the tar file and the databases.
share|improve this answer
    
Thanks for your answer. I am sorry I could not answer sooner; I had a problem with my internet connection. Regarding point 1, isn't necessary to specify in the command the name of the folder where you can save that mysqldump? Regarding point 2, an error appears when I try to run that command imgur.com/6fQXmoD The error is marked as point number 1 in the image; point number 2 refers to the fact that a tar file was created but its size is only 11 KB...I do not think the backup went right. Could you tell me what is happening? Thanks in advance. – pablofiumara Nov 6 '13 at 15:08
    
Problem is your pathing and commandline usage, see: computerhope.com/unix/utar.htm – Simon Hayter Nov 6 '13 at 17:56
    
Thanks again for your comment. Unfortunately, trying the examples I saw in the link you sent me did not work. Only a small file of 11KB was created. Something must be wrong. – pablofiumara Nov 6 '13 at 18:43
    
At the minimum you need to replace /var/www/this/is/the/webhost/path with the actual path to your website files. It sounds like you are not doing that, or don't have that path correct. – Stephen Ostermiller Nov 12 '13 at 1:33

Are you sure you don't need key-pair exchanged for this setup ?

ssh is TCP. It needs handshaking as the first and key-pair exchange as the second thing to work (cryptographically secure connection is a necessity in ssh, which is a better version of rsh). If you think both the hosts are having these things satisfied, it will work on the contrary you are following everything exactly as required.

As a naive example, say, on my Unix/Linux, $PWD, i.e., present working directory, gives me /home and ls -l $PWD spits out a list of things where the first column resembles, for some of the entries somewhat nearby this drwxr-xr-x+ where the d tells us that the corresponding entry is a directory (folder) and coincidentally I want to make a tar (it is not a compressed archive though it is better) for this directory.

I have assumed you have read access for the directories/files you are interesting in taring

Check the value of Access using stat file-name OR stat folder-name when you are in that directory where file-name OR folder-name exist. stat utility should be installed.

Coming back to tar, I will do this:

tar cf any-name-of-tar-file-for-some-folder.tar folder-name

I hope this will be of some assistance.

share|improve this answer

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.