Page 1 of 2

Changing backup location

Posted: Tue May 17, 2016 4:53 am
by Hnaseri
Hi,
I tried to change backup location of vestacp, to my external hard drive,
I followed this topic : viewtopic.php?t=3842
but now I get this error: Can't create tmp dir
please advise me to fix the problem
thanks

Re: Changing backup location

Posted: Tue May 17, 2016 5:04 am
by Hnaseri
btw I really think there should be a configuration option for backup, either visually implemented in VestaCP panel, or something that we could manually configure with shell access.
I think the following options would be great:
backup location,
number of backups (currently I see that there only three backups is stored in my server)
different backup scenarios (one database only backup each day, one backup for whole system each week, etc)

Re: Changing backup location

Posted: Tue May 17, 2016 11:28 am
by mehargags
why not create a cron job that "moves" backup set to your desired location. Much easier approach.!

Re: Changing backup location

Posted: Tue May 17, 2016 5:54 pm
by Hnaseri
I prefer to use a more kind of direct approach.

Re: Changing backup location

Posted: Tue May 17, 2016 6:23 pm
by mehargags
Hnaseri wrote:I prefer to use a more kind of direct approach.
unless you really know all the bash scripting and system control, I'd not try to be invasive and "direct" when I have a safer, faster, better way out. Plus the changes you do in VestaCP Scripts may not survive an upgrade asking for the whole exercise again.

The best way would be to "move" your backup sets via cron job... Will not take more than 2 mins to setup

Re: Changing backup location

Posted: Tue May 17, 2016 9:02 pm
by Mr.Erbutw
Hnaseri wrote:Hi,
I tried to change backup location of vestacp, to my external hard drive,
I followed this topic :
but now I get this error: Can't create tmp dir
please advise me to fix the problem
thanks
why did you raise such an old topic ...
now everything is simple
Image
only bug is not removed in Version: 0.9.8 sometimes the script is looking in /backup
With the release of a new version will fix it...

Code: Select all

ln -s /hdd/backup/drive /backup
hdd/backup/drive - specify the path where you will lay your backup

Re: Changing backup location

Posted: Wed May 18, 2016 3:01 am
by Hnaseri
Mr.Erbutw wrote: now everything is simple
thank you very much. indeed it is simple. However, what about different scenarios for backup?
for example , I want a daily backup for databases , and a weekly backup for entire system.

Re: Changing backup location

Posted: Wed May 18, 2016 8:31 am
by Mr.Erbutw
Hnaseri wrote:
Mr.Erbutw wrote: now everything is simple
thank you very much. indeed it is simple. However, what about different scenarios for backup?
for example , I want a daily backup for databases , and a weekly backup for entire system.
Yes, you can add in exceptions.

Image

if you do not want to do this backup
Image

Re: Changing backup location

Posted: Wed May 18, 2016 9:30 am
by Hnaseri
Mr.Erbutw wrote: Yes, you can add in exceptions.
I was aware of this. the problem is, there is only one backup cron.
I want something like two cronjobs, one for database that runs daily, and the other for the entire server that runs weekly.

Re: Changing backup location

Posted: Wed May 18, 2016 9:57 am
by Mr.Erbutw
You can create another cron value, and put it in /usr/local/vesta/bin/
That's the main value

Code: Select all

sudo /usr/local/vesta/bin/v-backup-users 
can like this to create the same value, for example v-backup-users_1 and put it in to the main. and add in cron to run at specified time. Just remember that it needs fixing the parameter section "exclusions".