Steps to export a folder from command line where folder name contains white spaces: Difference between revisions

(Created page with "=== <h1>Steps_to_export_a_folder_from_command_line_where_folder_name_contains_white_spaces </h1> === <hr> <br> <h2>Problem:- </h2> Folder export does fail when folder name...")
 
No edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=== <h1>Steps_to_export_a_folder_from_command_line_where_folder_name_contains_white_spaces </h1> ===
{{BC|Certified}}
__FORCETOC__
<div class="col-md-12 ibox-content">
=Export a folder from command line when folder name contains white spaces=  
<hr>
<hr>
<br>
{{KB|{{ZC}}|{{ZCS 8.8}}|{{ZCS 8.7}}|{{ZCS 8.6}}|{{ZCS 8.5}}|{{ZCS 8.0.x}}|{{ZCS 7.x}}|}}




<h2>Problem:-  </h2>
Folder export does fail when folder name having white spaces and generating "no such item" error.


<pre>$ zmmailbox -z -m USERNAME@DOMAIN.COM gru '//Communications Officer Recruitment?fmt=zip' > /tmp/test.zip     
====Problem====
ERROR: service.FAILURE (system failure: GET from https://MAIL.DOMAIN.COM/home/USERNAME@DOMAIN.COM//Communications%20Officer%20Recruitment?fmt=zip failed, status=404.  no such item)    </pre>
Folder export fails when folder name has white spaces and generates "no such item" error as below - 
zmmailbox -z -m USERNAME@DOMAIN.COM gru '//Communications Officer Recruitment?fmt=zip' > /tmp/test.zip     
ERROR: service.FAILURE (system failure: GET from https://MAIL.DOMAIN.COM/home/USERNAME@DOMAIN.COM//Communications%20Officer%20Recruitment?fmt=zip failed, status=404.  no such item)     




<h2>Solution:-  </h2>
====Solution====
Here are the commands to export a folder which has white space in name
Use the given commands to export a folder which has white spaces in it's name -


<pre>zmmailbox -z -m USERNAME@DOMAIN.COM gru '//?fmt=tgz&query=in:"Communications Officer Recruitment"' > /tmp/test1.zip     
zmmailbox -z -m USERNAME@DOMAIN.COM gru '//?fmt=tgz&query=in:"Communications Officer Recruitment"' > /tmp/test1.zip     
OR   
OR   
zmmailbox -z -m USERNAME@DOMAIN.COM gru '//?fmt=tgz&query=under:"Communications Officer Recruitment"' > /tmp/test2.zip     
zmmailbox -z -m USERNAME@DOMAIN.COM gru '//?fmt=tgz&query=under:"Communications Officer Recruitment"' > /tmp/test2.zip     
</pre>
 
'''Note:- ''' <br>
'''Note:- '''  
 
If the query is [ in: ] , then only selected folder will export.  
* If the query is [ in: ] , then only selected folder will export. <br>
If the query is [ under: ] , then selected folder and sub-folders will export.
 
* If the query is [ under: ] , then selected folder and sub-folders will export.
 
 
 
{| class="wikitable" style="background-color:#d0f0c0;" cellpadding="10"
|'''Submitted by''':  Heera Singh Koranga
|}
 
{{Article Footer|ZCS 8.8, 8.7, 8.6, 8.5, 8.0.x, 7.x|2017-08-23}}

Latest revision as of 12:23, 6 June 2020

Export a folder from command line when folder name contains white spaces


   KB 23297        Last updated on 2020-06-6  




0.00
(0 votes)


Problem

Folder export fails when folder name has white spaces and generates "no such item" error as below -

zmmailbox -z -m USERNAME@DOMAIN.COM gru '//Communications Officer Recruitment?fmt=zip' > /tmp/test.zip    
ERROR: service.FAILURE (system failure: GET from https://MAIL.DOMAIN.COM/home/USERNAME@DOMAIN.COM//Communications%20Officer%20Recruitment?fmt=zip failed, status=404.  no such item)    


Solution

Use the given commands to export a folder which has white spaces in it's name -

zmmailbox -z -m USERNAME@DOMAIN.COM gru '//?fmt=tgz&query=in:"Communications Officer Recruitment"' > /tmp/test1.zip     

OR

zmmailbox -z -m USERNAME@DOMAIN.COM gru '//?fmt=tgz&query=under:"Communications Officer Recruitment"' > /tmp/test2.zip     

Note:-

  • If the query is [ in: ] , then only selected folder will export.
  • If the query is [ under: ] , then selected folder and sub-folders will export.


Submitted by: Heera Singh Koranga
Verified Against: ZCS 8.8, 8.7, 8.6, 8.5, 8.0.x, 7.x Date Created: 2017-08-23
Article ID: https://wiki.zimbra.com/index.php?title=Steps_to_export_a_folder_from_command_line_where_folder_name_contains_white_spaces Date Modified: 2020-06-06



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Jump to: navigation, search