Page 1 of 2

Ftp backup all accounts

Posted: Wed Apr 02, 2014 11:14 am
by n1kko
Is it possible to have all domains backup to an ftp server everyday automatically?

Re: Ftp backup all accounts

Posted: Wed Apr 02, 2014 11:25 am
by imperio
Yes. this feature is implemented in the panel

Re: Ftp backup all accounts

Posted: Wed Apr 02, 2014 12:59 pm
by n1kko
Great thanks but is it possible to change the backup directory to another ftp server?

Re: Ftp backup all accounts

Posted: Wed Apr 02, 2014 1:25 pm
by imperio
You can create a new config file with name ftp.backup.conf
/usr/local/vesta/conf
file content

Code: Select all

HOST='ftphost_ip'
PORT='21'
USERNAME='backup-user'
PASSWORD='p4ssw0rd'
BPATH='/'
for example:
BPATH='/backup'

then you should change the vesta config file
/usr/local/vesta/conf/vesta.conf

Code: Select all

change BACKUP_SYSTEM='local'
for this BACKUP_SYSTEM='ftp'
or this if you want to create backups on local and ftp
BACKUP_SYSTEM='local,ftp'

Re: Ftp backup all accounts

Posted: Fri Apr 04, 2014 3:31 pm
by n1kko
Great thanks, how would I add a cron job for these backups to run each day?

Thanks for your help :D

Re: Ftp backup all accounts

Posted: Fri Apr 04, 2014 3:52 pm
by imperio
by default, backups are created 05:10 on server time
you can edit the cronjob command

Code: Select all

sudo /usr/local/vesta/bin/v-backup-users

Re: Ftp backup all accounts

Posted: Fri Apr 04, 2014 5:54 pm
by n1kko
Thanks, the problem I think I have is I have added a user then added the domain under that user, So on the main admin account it is only backing up the main admin account and not other domains under usernames.

Re: Ftp backup all accounts

Posted: Sat Apr 05, 2014 10:16 am
by imperio
This command makes backups of all users

Re: Ftp backup all accounts

Posted: Sat Apr 05, 2014 10:26 am
by n1kko
I am using IP as ftp path so this worked for me by removing PORT='21'

Code: Select all

HOST='ftphost_ip'
USERNAME='backup-user'
PASSWORD='p4ssw0rd'
BPATH='/'

Re: Ftp backup all accounts

Posted: Wed Aug 06, 2014 11:49 pm
by lolbrol
imperio wrote:You can create a new config file with name ftp.backup.conf
/usr/local/vesta/conf
file content

Code: Select all

HOST='ftphost_ip'
PORT='21'
USERNAME='backup-user'
PASSWORD='p4ssw0rd'
BPATH='/'
for example:
BPATH='/backup'

then you should change the vesta config file
/usr/local/vesta/conf/vesta.conf

Code: Select all

change BACKUP_SYSTEM='local'
for this BACKUP_SYSTEM='ftp'
or this if you want to create backups on local and ftp
BACKUP_SYSTEM='local,ftp'
I did this, but the backup doesn't seem to work.
I also tried : v-add-backup-ftp-host ftp.adrive.com contact---domain.com pasword
The --- recplaces the @.
Or do I really need a IP instead of a domain?