Seafile Real Time Backup Server


#1

Dear Seafile Community
Running the ./seaf-backup-cmd.sh status shows:
Total number of libraries: 0
Number of synchronized libraries: 0
Number of libraries waiting for sync: 0
Number of libraries syncing: 0
Number of libraries failed to sync: 0

So, I read the seafile.log and among many messages, one tells the following:
Failed to get repo list from primary: Resource not found.

What is the repo list and where it is located ??

Thank you for your help.


#2

I’m having the same issue. I was following this guide https://manual.seafile.com/deploy_pro/real_time_backup.html

I have no idea how exactly seafile tries to access the repo list but it seems like it’s trying to use v1 API? I don’t know. I have nginx on my Seafile server to handle incoming requests and have a dedicated apache reverse proxy to terminate tls and so on.

Everything else works fine but the realtime backup server is not able to get the repo ids. Seems like some kind of misconfiguration to me but I can’t find the answer in the logs and docs.

EDIT: the backup server is trying to get repo information from /seafhttp/server-sync/repo-list
Shouldn’t it try getting it from api2 endpoint /api2/repos/?


#3

Yes I have the same asumption, looking at the seafile tree structure (directories) I could not find any directory with seafhttp name, but looking in the seafile-db I found several databases that begin with the name Repo, like RepoInfo, RepoHistoryLimit, RepoFileCount, Repo, RepoValidSince, etc., so can someone help us with this ??


#4

Using real-time backup requires that you have setup the primary server with Nginx or Apache. Have you done that? Can you post your seafile.conf in the backup server and primary server?


#5

Hi Jonathan.
I have Apache HTTP server installed in both the primary server and the backup server.

I did the seafile setup process following this guide https://manual.seafile.com/deploy_pro/real_time_backup.html

Here you are the seafile.conf file as you kindly asked me:

Primary Server (seafile.conf)

[fileserver]
port = 8082

[database]
type = mysql
host = 127.0.0.1
port = 3306
user = seafile
password = gemo7321
db_name = seafile-db
connection_charset = utf8

[backup]
backup_url = http://diestrabackup.ddns.net
sync_token = b9a925d42925d4d3e99b39d278116e5448332a68


Backup Server (seafile.conf)

[fileserver]
port = 8082

[database]
type = mysql
host = 127.0.0.1
port = 3306
user = seafile
password = gemo7321
db_name = seafile-db
connection_charset = utf8

[backup]
primary_url = http://diestra.ddns.net
sync_token = b9a925d42925d4d3e99b39d278116e5448332a68
sync_poll_interval = 3

thank you


#6

I can’t find anything wrong from you seafile.conf. Can upload/download files normally on your primary server? And what’s the version of both Seafile servers? Real-time backup is only supported after 5.1.0 version.


#7

Jonathan
Thank you for your help.
You said that I need to install Apache on the primary server in order for the real-time backup server to work. Unfortunately when I did that, Seahub crashed and I was not able to get the server to work. I have Apache on the backup server and everything works fine, so obviously it is a configuration problem.

I had to uninstall Apache, install Seafile and import the databases in order to get the system to function again. I have been trying to find a knowledgeable consultant in the area to help without success. When I have time, I may try starting over again and then importing the databases.


#8

Thank you for your response.
The main server has Seafile 6.1.9 version and de backup server has Seafile 6.3.2 version

The main problem is that there is not a guide to read and understand the different messages code that the seafile.log display. As an example of what seafile.log has been displaying, is as follows:

[12/17/2018 07:42:56 PM] http-tx-mgr.c(2177): Sync polling timer triggered, start to fetch repo list from primary.
[12/17/2018 07:42:56 PM] http-tx-mgr.c(611): libcurl failed to GET http://diestra.ddns.net/seafhttp/server-sync/repo-list: Couldn’t connect to server.
[12/17/2018 07:42:57 PM] size-sched.c(103): Repo size compute queue size is 0
[12/17/2018 08:37:57 PM] size-sched.c(103): Repo size compute queue size is 0
[12/17/18 23:37:37] http-server.c(197): fileserver: worker_threads = 10
[12/17/18 23:37:37] http-server.c(210): fileserver: backlog = 32
[12/17/18 23:37:37] http-server.c(225): fileserver: fixed_block_size = 8388608
[12/17/18 23:37:37] http-server.c(240): fileserver: web_token_expire_time = 3600
[12/17/18 23:37:37] http-server.c(255): fileserver: max_indexing_threads = 1
[12/17/18 23:37:37] http-server.c(270): fileserver: max_index_processing_threads= 3
[12/17/2018 11:37:39 PM] …/common/mq-mgr.c(61): [mq client] mq cilent is started
[12/17/2018 11:37:39 PM] http-tx-mgr.c(2177): Sync polling timer triggered, start to fetch repo list from primary.
[12/17/2018 11:37:39 PM] http-tx-mgr.c(1028): Failed to get repo list from primary: Resource not found.
[12/17/2018 11:37:40 PM] size-sched.c(103): Repo size compute queue size is 0
[12/17/2018 11:42:40 PM] size-sched.c(103): Repo size compute queue size is 0

I can connect from the backup server to the main server via Teamviewer and via SSH

Hope you can help me solve this problem.


#9

I would upgrade the main server to the same version as the Backup Server, a version mismatch can cause these errors.


#10

I do not think so, the seafile.log would tell something about it.


#11

This error indicates that your backup server can’t connect with your main server. This can be a temporary problem (network connection, DNS).

This time it seems your backup server can connect but has a problem to get the repo list and i think the reason is your version mismatch. In general it’s not a good idea to run both systems on different versions.


#12

Hi Marcusm,
Thank you for the interpretation of some of the seafile.log messages.

I will do what you suggest, running both servers in the same version. I will update the main server and we will see what happens.


#13

Hi Jonathan.
Making a complete review of the steps for installation and configuration of the Seafile Real Time Backup, I wondered if the procedure of Config Seahub with Apache should be done only on the main server or also on the backup server ??
Regards.


#14

You should do both.