Use database backup , but nothing backup in --settings-file


#1
usage: memsql-ops database-backup [--settings-file SETTINGS_FILE] [--async] -D
                                  DATABASE

Please help us to solve this issue, thanks.

[root@memsql-1 ~]# memsql-ops database-backup --settings-file /tmp/111.sql --async --database game
Starting backup for database game
[root@memsql-1 ~]# more /tmp/111.sql
[root@memsql-1 ~]#

If backup successfully , why could not view any thing in 111.sql file.


#2

The --settings-file option specifies the settings file to use for the backup. It does not specify the backup itself. The backup generated will be a binary file, not a .sql file. You can see the backup with memsql-ops backup-list.

If you want to generate a .sql file, I recommend using mysqldump


#3

[root@memsql-1 tmp]# memsql-ops database-backup --settings-file /tmp/111 --async --database game
Starting backup for database game
[root@memsql-1 tmp]# ls
111 memsqlbin memsql-ops-4.0.28 memsql.sock perf-11324.map tmp.6sn1XS11Wf
123.sql memsqlbin_amd64.tar.gz memsql-ops-4.0.28.tar.gz perf-11320.map perf-2284.map vmware-root
[root@memsql-1 tmp]# ls -l 111
-rw-r–r-- 1 root root 0 Nov 30 09:54 111
[root@memsql-1 tmp]#

We have tested again , but it still backup nothing in the `–settings-file.


#4

The --settings-file flag is only used to configure memsql-ops and is only useful when starting an agent using memsql-ops start. If you are trying to configure the location of your backup please restart the memsql-ops agent using a custom settings file with the backups_dir variable set in the file.


#5

I recommend using the backup functionality within MemSQL directly as opposed to using backup through MemSQL Ops. You can learn more about our backup functionality here: https://docs.memsql.com/operational-manual/v6.7/backing-up-and-restoring-data/


#6

Hi Carl,

Thanks for your help. 001