LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Backup options of a remote ftp account? (http://www.linuxquestions.org/questions/linux-newbie-8/backup-options-of-a-remote-ftp-account-391341/)

jme 12-10-2005 03:03 PM

Backup options of a remote ftp account?
 
I am looking for suggestions and advice on backing up a remote ftp account that I have. Basically I have a ftp hosting account which is hosting a php site that 6-7 developers are working on and I would like a way of backing this up at, say daily, intervals onto my server here, as a back up and for redundancy.

The only access that I have to the remote server is the ftp access, I don't have any type of shell access at all.

Any ideas would be greatly accepted.

Many thanks. Jamie :)

Tinkster 12-12-2005 04:17 PM

You should be able to use wget for this.


wget -m ftp://your.site.com/your/dir


Cheers,
Tink

liamoboyle 12-12-2005 10:00 PM

The above suggestion will only work to get the output produced by your site unfortunately, not the actual dynamic code itself (which may be what you want). If you want the php code, rather than out put, and you can only use ftp to access the site you should install something like lftp on your local machine. You can specify the password and account name in a separate file, so that you can use cron to schedule you backups instead of doing it manually. You can then use the mirror command to recursively get the site.

Ideally you'd want to use rsync - this can be done over ssh if you can get ssh access or via the rsync protocol, which means that the remote host can allow you very limited write access and no shell access if they like. If the people hosting the site will only give ftp access, change your host, seriously.

Tinkster 12-13-2005 12:15 AM

Quote:

Originally Posted by liamoboyle
The above suggestion will only work to get the output produced by your site unfortunately, not the actual dynamic code itself (which may be what you want). If you want the php code, rather than out put, and you can only use ftp to access the site you should install something like lftp on your local machine. You can specify the password and account name in a separate file, so that you can use cron to schedule you backups instead of doing it manually. You can then use the mirror command to recursively get the site.

Ideally you'd want to use rsync - this can be done over ssh if you can get ssh access or via the rsync protocol, which means that the remote host can allow you very limited write access and no shell access if they like. If the people hosting the site will only give ftp access, change your host, seriously.


How exactly does his ftp-server interpret the PHP
scripts? wget used with ftp works in exactly the
same way that lftp would.


Cheers,
Tink

liamoboyle 12-13-2005 03:35 AM

Quote:

Originally Posted by Tinkster
How exactly does his ftp-server interpret the PHP
scripts? wget used with ftp works in exactly the
same way that lftp would.


Cheers,
Tink


My apologies, you're absolutely right - I overlooked the ftp://

jme 12-17-2005 07:40 AM

Thanks for your help guys. Used the wget and it worked like a dream. :)


All times are GMT -5. The time now is 07:01 PM.