XMailforum is a readonly knowledge archive now.

Registering as a new user or answering posts is not possible anymore.

Might the force be with you, to find here what you are looking for.

2019-09-20 - hschneider, Admin

Cookie Disclaimer: This forum uses only essential, anonymous session cookies (xmailforum*), nothing to be scared of.

XMail Forum [Powered by Invision Power Board]
Printable Version of Topic
Click here to view this topic in its original format
XMail Forum > XMail Server > How To Copy Xmail Domain Directory Structure


Posted by: sergiut2002 Jan 26 2010, 03:15 PM
This command will copy directory structure without any file:
QUOTE

root@trat:~# cd /new/dir
root@trat:~# (cd /old/dir; find -type d ! -name .) | xargs mkdir

/new/dir - path to new directory where all old directories will be copied
/old/dir - path to old domain mail directory structure

This command will copy directory structure excluding files specified with --exclude switch:
QUOTE

root@trat:~# tar -c --exclude=*.tab sourceDir | tar -x -C destDir


--exclude=*.tab - will exclude all files that have .tab extension
sourceDir - path to old domain directory
destDir - path where all directories will be copied

Posted this commands in case someone wants to move to a new server and wants his old directory structure copied without mails.

hope it helps.wacko.gif

Posted by: sergiut2002 Feb 10 2010, 09:29 AM
QUOTE
find . -name '*.trat' | xargs -n 1 rm


this command will delete all files with .trat extension.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)