0

I have a VPS running Centos.

I also have a site (say, example.com) hosted on separate, shared hosting. I would like to backup all images in the "images" folder, which consist of the following structure:

example.com/images/mammals

example.com/images/reptiles

example.com/images/birds

The files can be .JPG, .PNG and .GIF

How do I backup the entire folder from the shared hosting to my VPS?

Would I use wget? If yes, what would be the command(s)?

Thanks very much!

Honey Badger
  • 809
  • 3
  • 11
  • 15

1 Answers1

3

Best way to synchronize remote folders is rsync. To have security use rsync over ssh.

So first make sure that you can use ssh and rsync on VPS server.

If you do not have rsync, then you can use wget --mirror. With wget you can filter which file pattern to download.

Mircea Vutcovici
  • 16,706
  • 4
  • 52
  • 80
  • Thank you Mircea. Could you please kindly show the commands to use? I can definitely use rsync and ssh on the VPS. Thanks! – Honey Badger May 05 '13 at 00:48
  • For a complete example of rsync over ssh, take a look on: http://serverfault.com/questions/255084/simple-rsync-in-crontab-without-password – Mircea Vutcovici May 05 '13 at 02:50