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?

Bani
  • 1,149
  • 2
  • 10
  • 17

2 Answers2

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

Up_One
  • 5,213
  • 3
  • 33
  • 65
  • 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. – Kermit Sep 03 '14 at 23:45
  • valid approach as well. – Up_One Sep 04 '14 at 11:30
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.
Joe
  • 200
  • 1
  • 5
  • 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. – Bani Jan 04 '13 at 21:03