Is there a way where I can automate backup of questdb using ebs volume running quest db as ami in ec2

I want to either change data storing directory of questdb to a volume or take automated backup to volume using snapshop

You will need to write a script to do this, in your favourite language.

  • change data storing directory for database
    • stop database
    • copy to a new volume
    • start database
  • change data storing directory for one table
    • create a new table using IN VOLUME
    • copy data from old table to new table
    • drop original table
    • rename new table
  • automated EBS backups
    • run CHECKPOINT CREATE
    • start EBS snapshot
    • wait for EBS snapshot to say PENDING
    • run CHECKPOINT RELEASE

Then make these processes triggerable by timer or API.

If I am trying to change the directory by changing cairo.root = some cloud path , copied the contents of directory “questdb” to volume and restarted the db, I was not able to connect to db… is there something I am missing.

Note : using quest db ami

What do you mean by ‘some cloud path’? The path needs to be some a mounted disk i.e an EBS volume attached to the EC2 instance.

Please share some screenshots/logs to add some context so we can help you further :slight_smile:

Yes you are correct I am giving a mounted path example “./mnt/questdb” and issue is solved now as it was access issue.
Do I need to restart questdb after changing the root directory

Yes, you should stop QuestDB before relocating it, and then start it again afterwards.