backup
backup [--file] [--prefix] [--directory] [--overwrite] [--binary]
Backups database to standard out or a file. This command requires connection to a user database.
Options
Option |
Explanation |
---|---|
–file, -f |
reads objects from specified file |
–prefix, -t |
first part of generated file name |
–directory, -t |
generates a new file name in specified directory |
–overwrite, -ow |
overwrite an existing file |
–binary, -b |
user binary format rather than json |
Example
tomas@tomsmbp:~/ > dboo MyDB -u=MyUser
dboo MyUser@MyDB> backup > ./mybackup.bak
dboo MyUser@MyDB> quit
tomas@tomsmbp:~/ > ls -lh mybackup.bak
-rw-r--r-- 1 tomas staff 553B 19 May 21:49 mybackup.bak
tomas@tomsmbp:~/ >
tomas@tomsmbp:~/ > dboo MyDB -u=MyUser -- backup > ./myotherbackup.bak
tomas@tomsmbp:~/ > ls -lh myotherbackup.bak
-rw-r--r-- 1 tomas staff 553B 19 May 21:50 myotherbackup.bak