how to backup volumes with collection information

173 views
Skip to first unread message

ZStephen

unread,
Sep 13, 2022, 3:33:13 AM9/13/22
to Seaweed File System
Hi, Guys:
    I have a seaweedfs enviroment with one Master and two volume servers. Now I'm going to backup all the volumes to another server in the same network. My existed volumes are tagged with collection information such as Music\Document\Picture, when I backup them with command "weed backup -server=ip:port' -dir=backupdir -volumeId=N" , the tag information is missing. Do I need backup some Master data too?

Thanks in advance.

Chris Lu

unread,
Sep 13, 2022, 3:46:26 AM9/13/22
to seaw...@googlegroups.com
The "weed backup" command only tries to ensure the .dat file is incrementally copied over. The final .dat should be exactly the same as the source .dat file.
There should not be any tag information missing.

Chris

--
You received this message because you are subscribed to the Google Groups "Seaweed File System" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seaweedfs+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/seaweedfs/c0217367-6301-4e68-a233-62612286aff6n%40googlegroups.com.

ZStephen

unread,
Sep 13, 2022, 3:53:01 AM9/13/22
to Seaweed File System
Hi, Chris:
   Thanks to reply. If I need to backup the collection information of the volumes at the same time, do you have any suggestions?
Should I backup the Master Server data too?

Chris Lu

unread,
Sep 13, 2022, 3:54:52 AM9/13/22
to seaw...@googlegroups.com
What is "the collection information of the volumes"?

ZStephen

unread,
Sep 13, 2022, 4:10:07 AM9/13/22
to Seaweed File System
I used the collection parameter when I assigned the file keys , such as "curl http://localhost:9333/dir/assign?collection=music",
Then I can see the volume collection information in the Volumes list with Master server http gui or weed shell collection.list.
I need keep the "music" information when I backup the volumes, in order to kown the file type I stored in the volume.


ZStephen

unread,
Sep 13, 2022, 4:24:20 AM9/13/22
to Seaweed File System
I can see that the data files have the collection name as the prefix,  But when I backup them to another server , the files name just start with the ID  without the prefix collection name .

Chris Lu

unread,
Sep 13, 2022, 4:37:20 AM9/13/22
to seaw...@googlegroups.com
Need to specify collection name in the command. See "weed backup -h"

ZStephen

unread,
Sep 13, 2022, 4:55:51 AM9/13/22
to Seaweed File System
So I need to get a volume's original collection using other API, then specify the -collection parameter when I backup it using "weed backup -server=ip:port' -dir=backupdir -volumeId=N -collection=originalCollection " ?

Is any possible to let weed keep the original collection by default while backup? 

Maybe I can use rsync to sync volume data files and index files,  It can keep the files name,  then the collection name kept too.

Thanks in advanced.

Reply all
Reply to author
Forward
0 new messages