Is there a way to backup a running database?
Hotcopy command allows you to obtain a copy of a running database. This copy contains the current state of the storage manager
- The hotcopy command will copy the contents of the database archive directory to another directory on the same host.
- The output of the copy contains the archive and the journals of that database.
- Contains the state of the SM as it was at the time when the hot copy finished running.
Steps required to take an online NuoDB database backup
1. Determine which SM to use for backup
Use: show database processes database <dadabase_name>
Confirm SMs are in status RUNNING and not SYNC
2. Determine which directory to hotcopy to
Given the amount of read/write active during the hotcopy operation it’s recommended that the directory for the hotcopy is on a different disk drive then the archive and journal.
You can also use mount point from an external NAS or SAN storage.
3. Start hotcopy
From NuoDB Manager run the command:
hotcopy database <dadabase_name> destinationArchiveDirectory <directory_path>
4. On completion, run the nuochk utility
After the hotcopy finished, it is very important to run the nuochk utility to ensure the backup is free of errors.
From the command line run:
* Use the same directory_path you use as the destinationArchiveDirectory on step 3.
5. If possible copy the output archive folder to a safe location.
* If you are using different path for the archive and the journal files, make sure to use the --journal-dir option
- Note that hotcopy in NuoDB 2.6 does not support storage groups. For information on backing up storage groups, email email@example.com