Backup and Retore MongoDB database from console Ubuntu

For dump mongo use command
$ mongodump --db $db_name --out $dump_path

For restore from exsist dump use next command
$ mongorestore -h $host --port $port --username $user --password --db $db_name $backup_path

*replace $vars for you variables