Start Vertica database during boot on Linux
Asked Answered
W

2

5

I have Vertica installed in an Ubuntu virtual machine and I'd like to have a specific database started during the boot, instead of me having to login, open admintools and start from there.

So, is there a command line that would allow me to start it without user interaction? In which run level should I add this? Also, I use a specific user to run everything Vertica related, does this need to be taken into account in my boot script?

Wadlinger answered 3/1, 2013 at 14:38 Comment(0)
A
7

Why not just set the restart policy(reboot on boot) in your admintools "Set Restart Policy" You have 3 option : Never ksafe always -- chose this one to start on boot.

And that is it ! enter image description here

Amandy answered 17/5, 2013 at 18:9 Comment(2)
I wouldn't recommend this method as it only helps when the database is up and is K-safe. The best approach is to append admintools -t start_db ... to the startup.Everson
valid approach as well.Amandy
A
6

admintools -t start_db

[dbadmin@hostname ~]$ admintools -t start_db --help
Usage: start_db [options]

Options:
  -h, --help            show this help message and exit
  -d DB, --database=DB  Name of database to be started
  -p DBPASSWORD, --password=DBPASSWORD
                        Database password in single quotes
  -i, --noprompts       do not stop and wait for user input(default false)
  -F, --force           force the database to start at an epoch before data
                        consistency problems were detected.
Aeroscope answered 4/1, 2013 at 14:16 Comment(1)
Ok, I added that to /etc/rc.local inside a su command. A bit ugly because I can see the output on my login screen, but that will do.Wadlinger

© 2022 - 2024 — McMap. All rights reserved.