[Fallback] Backup and restore automatically your server

Ok I do reproduce the error on my side, it wasn’t in my mail strangely this morning.
I’ll investigate the error

Again a modification of the behavior of the command without a warning or an information about it…
So the script doesn’t have what it expects… Working on it…

And I found some stupid mistakes, because it wasn’t tested, that you didn’t encounter since it was later in the code.

The send_backup script is now working on my side, I pushed the fixes.

Sounds great. Will test tomorrow!
Thank you @Maniack_Crudelis

OK for me. All went ok.

1 Like

Hi all, thanks for this packadge which looks super usefull ! Some questions :

  1. Is it safe to use (rpi4b on ynh4.2). It is stated as not maintain ?
  2. Is the backup could include a data partition or should I use a separate rsync ? i.e for the data of nextcloud…
  3. No particular config to have fallback of mail server of the domain ?

Many thanks, Steven

Hi, I was able to install successfully the main and fallover servers !

From the mail I received after installation, the link to the config panel return an error:
Erreur: “500” Internal Server Error
Action: “GET” /yunohost/api/apps/fallback/config-panel?locale=fr

The 2nd one works /yunohost/admin/#/apps/fallback/actions
I tried to create a new backup and got an error:
https://paste.yunohost.org/raw/oyexohucoj

Does anyone have an idea ?
many thanks !

The automatic job also failed but is more verbose on the causes

usage: yunohost {backup} …
[-h] [–output-as {json,plain,none}] [–debug] [–quiet]
[–timeout ==SUPPRESS==] [-v]
yunohost: error: unrecognized arguments: --no-compress
Raspbian GNU/Linux 10
Permission denied, please try again.
Permission denied, please try again.
fallback@nocloude-fallover.ynh.fr: Permission denied (publickey,password).
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3]

So I guess the backup method was updated since the last release of the packadge.
and something goes wrong in the install for the ssh keys.

Not too sure where to look for and if I can fix it… Any guidance is welcome

The package does not use the last version of the fallback app.
I didn’t read your other logs though…

I’ll get back to you and check the issue when I have some time.

Thanks @Maniack_Crudelis ! This packadge is one of the most usefull I think

Sorry @steven for the delay, and actually… the fix was already on this branch since late january…
I forgot to merge it…

I merged it in master just now, it should be ok now.

Thanks for the heads-up :wink:

I’ll update the app and let you know

Hi, i didn’t understood if i have to install a fresh yunohost instance on the fallback server, or the fallback server is installed from the main server.

Someone?

Hi @valterbarreira, the fallback server is an app on its own that have to be installed on a YunoHost instance.
When used, the fallback instance will be backed up then your regular instance will be restored to replace it.

@Maniack_Crudelis Thanks for you reply.
So, first install a clean yunohost on my second server, then on my production yunohost server install the fallback server app on it with main server options only, then install the fallback server app on my second server with fallback server options. Thats it?

That’s exactly how it works.

You need to have a second server ready to work, so the app on the main server can try to reach the second server during the installation.
At the end of this installation, you’ll have a public ssh key that you’re going to use to install the app on the fallback server.

Then, you’re all set.

Sorry, edited my post after your reply, maybe you didn’t saw it. Added the following:

When the install of yunohost on the second server, what domain should i use? Should i use a .nohost.me or my main tld domain?
Also is necessary to create a user after the postinstall? And install a ssl certificate?

As far as I remember, any domain would work, I use a sub domain of my own domain.
But not the same as your main server, otherwise the server can’t be reach.
But, you can also use the IP address instead of the domain name.

I don’t think you need an user, but I’m not sure YunoHost will let you install an app without an user…

A SSL certificate isn’t of use either, unless you want to use that fallback for other purposes.

Oh, i didn’t thought of a subdomain, good point!

I have set up the fallback, how do i known if the backup was made?

edit: so i received an email with errors. the backup is made on the main server? I don’t have much free space on it.

The backup hook ‘conf_ssowat’ is unknown
The backup hook ‘conf_xmpp’ is unknown
The backup hook ‘conf_nginx’ is unknown
The backup hook ‘conf_cron’ is unknown
The backup hook ‘conf_ynh_currenthost’ is unknown
Not enough free space on ‘/home/yunohost.app/fallback/fallback_backup/temp_fallback_backup’
It’s hightly recommended to make your backup when the service is stopped. Please stop synapse service with this command before to run the backup ‘systemctl stop matrix-synapse.service’
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(235) [sender=3.1.3]