How would or could I migrate existing directories into Seafile

357 views
Skip to first unread message

D D

unread,
Mar 4, 2015, 10:59:25 AM3/4/15
to sea...@googlegroups.com
I have a few directories on a NAS system (serves both NFS and CIFS)

I'd like to to take a handfull of the existing directories and "Seafile" them

Is i possible to mount the directory (CIFS or NFS) to a box that has the Seafile client and tell the Seafile client to use these directory and have seafile create a library with folders  of the directories that are mounted.

Hope that made sense

So I have

Data
    |
   +--- ENG
    |       +--- Source
    |               +--- Proj A
    |               +--- Proj B
    |                        +--- Doc
    |                        +--- Java
   +--- Test
    |       +--- Install
    |       +--- ReLoad
    |    
   +--- Blah Blah

I'd lile to tell Seafile client that the seafile DIR is DATA and have seafile build a ENG Library with the contents from the Mounted ENG director so all the files and folders Source, Source\Proj A, Source\Proj B,  Source\Proj B\Doc, Source\Proj B\Java. Then seafiel would build a TEST library with the folders  Test\Install, Test\ReLoad. Then a library  Blah Blah  . . .

The seafile server will be on a different server and will be used to share this data

If this is not possible what would be the best way to get this data into Seafile  (2 - 3 terabytes)
 

Nicolas Sebrecht

unread,
Mar 4, 2015, 11:58:27 AM3/4/15
to sea...@googlegroups.com, Nicolas Sebrecht
It's not possible to do what you want in 1 step. Seafile client can
import already existing directory as a library but it does not know how
to automatically create multiple libraries.

I would get the boring job done with the seafile API. First, import
everything in a big whole "Data" library. Then, make the script to
"split" it the way you want. Notice that "split" is not a good word
because you might rather want to create sub-libraries or copy/move
contents from the "Data" library into fresh new created libraries...

--
Nicolas Sebrecht

D D

unread,
Mar 4, 2015, 2:33:59 PM3/4/15
to sea...@googlegroups.com, nicola...@laposte.net
API and script - Where can I find info on a seafile API - I've done dome simple scripting is this something that would required a seasoned individual ?

I can mount the  entire NAS on a single mount point do that will give me the one big whole "DATA"  source. Will the client allow me to upload entire directories ? Perhaps I can manually create the libraries then drag and drop files / folder into the libraries  

Is a sublibrbay a directory ?

Nicolas Sebrecht

unread,
Mar 5, 2015, 4:37:01 AM3/5/15
to D D, sea...@googlegroups.com, nicola...@laposte.net
On Wed, Mar 04, 2015 at 11:33:59AM -0800, D D wrote:

> API and script - Where can I find info on a seafile API - I've done
> dome simple scripting is this something that would required a seasoned
> individual ?

Can't say, sorry. You might want to start by yourself and offer a
seasoned position if you're stuck or missing of time.

> I can mount the entire NAS on a single mount point do that will give
> me the one big whole "DATA" source. Will the client allow me to upload
> entire directories ?

Yes. Once the server is up, create a single library and upload the whole.
This is "sync with an existing directory" feature from the graphical UI.
I didn't check but I expect the seafile-cli (command-line) interface to
allow this, too.

> Perhaps I can manually create the libraries then
> drag and drop files / folder into the libraries

Possible, too. It depends on how many libraries you want in the end to
know if such manual operations won't consume you too much time.

This is not a drag-and-drop feature, though. You must click on the
source directory and target the new library which must already exist.

> Is a sublibrbay a directory ?

Yes. It's possible to share a directory after the facts, once it already
belongs to a library. To allow this, seafile creates a new library
behind the hood.

Here is the documented feature for this option of a running seafile
v4.0.6 server:

Sub-library Setting

Enable sub-library

This feature enables you to selectively sync a folder inside a library.
A sub-library can be created from any folder. After being created, it
will be listed in your desktop client, and you can download it just like
downloading a normal library. It will be automatically kept in sync with
its origin library.
Sub-library is also used when sharing a folder to a group or another
user. Without this option on, a hidden sub-library will be created
automatically in such case. With this option on, those hidden
sub-libraries will also be listed, which enables you to manage them.

--
Nicolas Sebrecht
Reply all
Reply to author
Forward
0 new messages