Page 1 of 1

Stop Deleting Backups in FTP

Posted: Thu Mar 15, 2018 7:27 pm
by pipoy
Hi,

by default, vestacp backup 3 files locally and externally via FTP.
When the file exceeds, vestacp deletes the oldest one to give room for the new one.

I am subscribed to a shared hosting that provides more disk space.
The plan here is to retain significant amount of backups in that shared hosting and let my VPS with vestacp backup have a few.

However, with the condition of 31/31 backups, I just found out that even in FTP, the the oldest file also gets deleted.

I want to retain files in the shared hosting. And let the local ones get deleted. But that is not the case.

Is there a way to not let vestacp delete the files over ftp as well?



If not possible, is there a linux command where I can just FTP the backup files to that shared hosting via CRON?
And disable the ftp backup in vestacp

Re: Stop Deleting Backups in FTP

Posted: Sat Mar 17, 2018 2:04 am
by rhyker2u
yes schedule a cronjob for a `mv` on your ftp server?

Re: Stop Deleting Backups in FTP

Posted: Sat Mar 17, 2018 3:33 am
by pipoy
rhyker2u wrote:
Sat Mar 17, 2018 2:04 am
yes schedule a cronjob for a `mv` on your ftp server?
Thanks
I actually did this already yesterday.

Anyway.

My next backup process that I want to happen is to backup ONLY the database every hour.
And backup the whole user daily.


I want to choose a specific backup at a given time.

How do I do this?

Hourly backup for database only
Daily backup for whole user

Dont know how to work this with exclusion if it exclude a backup forever

Re: Stop Deleting Backups in FTP

Posted: Sun Mar 18, 2018 12:46 pm
by rhyker2u
You can change the VestaCP backup frequency in your control panel. Click your user ('admin' for example) and press "CRON" in the top menu (not the black but white bar). Then find "sudo /usr/local/vesta/bin/v-backup-users", hover with the mouse of that entry and press the grey "edit" entry. And you simply can change the schedule to anything yuo like.

For a particular database backup you can create a new script and a cronjob for it. Script suggestion:

Code: Select all

sudo mysqldump -uroot -pPASSWORD admin_dbname > /root/admin_dbname.sql
You can find PASSWORD in /root/.my.cnf