copydb Examples
Windows:
The following commands make a copy of olddb. In this example, replace the named directory (\mydir\backup) with your own:
cd \mydir\backup
copydb olddb
sql olddb<copy.out
The following example creates a new database newdb:
createdb newdb
sql newdb<copy.in
sysmod newdb
The following command runs copydb with parameters supplied in a file called flagfile:
copydb -param_file=flagfile
where flagfile can contain the following entries:
dbname
-order_ccm
-relpath
-no_loc
-all
This is equivalent to the command:
copydb dbname -order_ccm -relpath -no_loc -all
Linux:
The following commands:
1. Create a printable data file encoded with the UTF8 character set (copydb ‑c flag). Remove the paths from the file names (‑relpath flag) so that the files will be created and copied from the current directory.
2. Generate the user defined table files in the database dbname.
3. Archive all the files that were just generated in the current directory.
copydb -c -relpath dbname
sql dbname <copy.out
tar -cvf backup.tar *
You can move the archive file to your backup server.
Last modified date: 11/09/2022