Remote FTP Backup Recipe
How to take backup of server on remote FTP account with Cron.
Create a file for e.g. /root/backup/ftpbackup with following contents.
[email protected] [~]# vi /root/backup/ftpbackup
---------------------------------------------------------------------------------------------
#!/bin/bash
lftp -u 'username,password' server1.example.com -e "set ftp:ssl-protect-data true;mirror --reverse /local/dir/name remotedirname;exit" > /dev/null
---------------------------------------------------------------------------------------------
username:: FTP User Name
password:: FTP User Password
server1.example.com :: remote FTP server
[email protected] [~]# chmod u+x /root/backup/ftpbackup
Set the cron to run the backup as you want.
[email protected] [~]# crontab –e
0 0 * * 0 /root/backup/ftpbackup > /dev/null 2>&1
How to take backup of server on remote FTP account with Cron.
Create a file for e.g. /root/backup/ftpbackup with following contents.
[email protected] [~]# vi /root/backup/ftpbackup
---------------------------------------------------------------------------------------------
#!/bin/bash
lftp -u 'username,password' server1.example.com -e "set ftp:ssl-protect-data true;mirror --reverse /local/dir/name remotedirname;exit" > /dev/null
---------------------------------------------------------------------------------------------
username:: FTP User Name
password:: FTP User Password
server1.example.com :: remote FTP server
[email protected] [~]# chmod u+x /root/backup/ftpbackup
Set the cron to run the backup as you want.
[email protected] [~]# crontab –e
0 0 * * 0 /root/backup/ftpbackup > /dev/null 2>&1