# Import/Export via comand line

**URL:** <https://discuss.dradis.com/t/import-export-via-comand-line/833>\
**Category:** Community Edition\
**Created:** [January 20, 2022, 1:10pm UTC](https://discuss.dradis.com/t/import-export-via-comand-line/833 "2022-01-20T13:10:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pride1st](https://avatars.discourse-cdn.com/v4/letter/p/f0a364/32.png) [@Pride1st](https://discuss.dradis.com/u/Pride1st)\
**Post date:** [January 20, 2022, 1:10pm UTC](https://discuss.dradis.com/t/import-export-via-comand-line/833/1 "2022-01-20T13:10:11Z")

</div>

Hi, I want to create docker container with dradis, that receives xml scan results and gives back one html common report. I used this guide and I have some questions about it: [From Nessus output to custom report | Dradis Pro Help](https://dradis.com/support/guides/command_line/nessus_to_report.html)

1. The ruby script create\_project.rb requaries 2 variables, not 1 as shown there. 1st is name and 2nd - user\_id. I have no idea what the user id suppose to be, so I just put 1. Error appears. Is here a way to get/create it? Or maybe, there are some default values?
2. I created project by using browser window on my kali VM and cheack its id. The command RAILS\_ENV=production bundle exec thor -T is working, but when I try to run  
“PROJECT\_ID=1 RAILS\_ENV=production bundle exec thor dradis:plugins:nikto:upload /test2/niktores” (without ", and correct id from url) I get error. Of course, export doesnt work too.  
All errors look same:  
4: from /usr/lib/dradis/ruby/2.7.0/gems/activerecord-6.1.4.4/lib/active\_record/connection\_adapters/schema\_cache.rb:111:in `columns' 3: from /usr/lib/dradis/ruby/2.7.0/gems/activerecord-6.1.4.4/lib/active_record/connection_adapters/schema_cache.rb:111:in `fetch’  
2: from /usr/lib/dradis/ruby/2.7.0/gems/activerecord-6.1.4.4/lib/active\_record/connection\_adapters/schema\_cache.rb:112:in `block in columns' 1: from /usr/lib/dradis/ruby/2.7.0/gems/activerecord-6.1.4.4/lib/active_record/connection_adapters/abstract/schema_statements.rb:116:in `columns’  
/usr/lib/dradis/ruby/2.7.0/gems/activerecord-6.1.4.4/lib/active\_record/connection\_adapters/sqlite3\_adapter.rb:346:in `table\_structure’:  
and +50 similar lines  
Did I miss something? I will be grateful for any info. I get the same errors on build in dradis, and dradis-ce from git.

---

<div class="post-metadata">

**Author:** ![rachkor](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.dradis.com/rachkor/32/51_2.png) [@rachkor](https://discuss.dradis.com/u/rachkor)\
**Post date:** [January 20, 2022, 5:26pm UTC](https://discuss.dradis.com/t/import-export-via-comand-line/833/2 "2022-01-20T17:26:05Z")

</div>

Hey @Pride1st! Rachael with the Dradis support team here. Since Dradis CE doesn’t support multiple projects, you actually won’t be able to use the create\_project.rb script. Instead, I’d look at a workflow like:

1. Backup your existing project if needed: [Importing and exporting projects | Dradis Pro Help](https://dradis.com/support/guides/projects/import.html#export)

2. Reset your CE database with something like:

```auto
$ bundle exec thor dradis:reset

```

1. Upload the file(s):

```auto
bundle exec thor dradis:plugins:nikto:upload /test2/niktores.xml

```

Let’s start there. If you still get the error when you try to upload, could you send a screenshot? Also, are you able to upload the file via the UI? That should help narrow things down. We’ll figure this out!

---

<div class="post-metadata">

**Author:** ![Pride1st](https://avatars.discourse-cdn.com/v4/letter/p/f0a364/32.png) [@Pride1st](https://discuss.dradis.com/u/Pride1st)\
**Post date:** [January 21, 2022, 2:28pm UTC](https://discuss.dradis.com/t/import-export-via-comand-line/833/3 "2022-01-21T14:28:09Z")

</div>

Okey, the problem was simpler than I thougth.  
PROJECT\_ID=1 RAILS\_ENV=production bundle exec thor dradis:plugins:nikto:upload /test2/niktores - doesnt work at all BUT  
bundle exec thor dradis:plugins:nikto:upload /test2/niktores - is working fine.  
So I even dont need to know project id to complete my task. There wasnt any trouble with export too. I am very appreciate for usefull and quick answer.
