# \[Fallback\] Backup and restore automatically your server

**URL:** <https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482>\
**Category:** Apps\
**Tags:** fallback\
**Created:** [September 15, 2017, 8:11pm UTC](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482 "2017-09-15T20:11:09Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![MonsterChips](https://forum.yunohost.org/user_avatar/forum.yunohost.org/monsterchips/32/2572_2.png) [@MonsterChips](https://forum.yunohost.org/u/MonsterChips)\
**Post date:** [February 4, 2020, 8:18am UTC](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482/62 "2020-02-04T08:18:05Z")

</div>

Hi !  
Sorry, i was very busy this week-end.

Still doesn’t work at night, i got this :

```
ssh: Could not resolve hostname p: No address associated with hostname
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.2] 

```

But works with this :

`sudo ssh fallback@backup.ndd.tld -i /opt/yunohost/fallback/send_process/ssh_key -v`

---

<div class="post-metadata">

**Author:** ![Maniack\_Crudelis](https://forum.yunohost.org/user_avatar/forum.yunohost.org/maniack_crudelis/32/13_2.png) [@Maniack\_Crudelis](https://forum.yunohost.org/u/Maniack_Crudelis)\
**Post date:** [February 5, 2020, 11:20am UTC](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482/63 "2020-02-05T11:20:31Z")

</div>

> [@MonsterChips](#):
>
> ssh: Could not resolve hostname p:

Did you remove the domain name ? is it really what you got ?  
If yes, check the syntax, you may have an error.

---

<div class="post-metadata">

**Author:** ![MonsterChips](https://forum.yunohost.org/user_avatar/forum.yunohost.org/monsterchips/32/2572_2.png) [@MonsterChips](https://forum.yunohost.org/u/MonsterChips)\
**Post date:** [February 7, 2020, 6:15pm UTC](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482/64 "2020-02-07T18:15:34Z")

</div>

Sorry i didn’t have time to watch before today.

So i watched why i got this message and didn’t know why.  
I deleted Fallback and installed it again and it works !

Thx for your help Maniack ! 🙂  
Have a good weekend !

---

<div class="post-metadata">

**Author:** ![MonsterChips](https://forum.yunohost.org/user_avatar/forum.yunohost.org/monsterchips/32/2572_2.png) [@MonsterChips](https://forum.yunohost.org/u/MonsterChips)\
**Post date:** [February 19, 2020, 8:17am UTC](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482/65 "2020-02-19T08:17:36Z")

</div>

Hi it’s me again ! 😅

When i add Seafile to the list of app, Fallback can’t backup it. Maybe because i have 500Go of datas, so it’s too heavy i don’t know.

I got this in the mail :

```
Traceback (most recent call last):
  File "/usr/bin/yunohost", line 214, in <module>
timeout=opts.timeout,
  File "/usr/lib/python2.7/dist-packages/moulinette/ __init__.py", line 136, in cli
moulinette.run(args, output_as=output_as, password=password, timeout=timeout)
  File "/usr/lib/python2.7/dist-packages/moulinette/interfaces/cli.py", line 425, in run
ret = self.actionsmap.process(args, timeout=timeout)
  File "/usr/lib/python2.7/dist-packages/moulinette/actionsmap.py", line 523, in process
return func(**arguments)
  File "/usr/lib/moulinette/yunohost/backup.py", line 2090, in backup_create
backup_manager.backup()
  File "/usr/lib/moulinette/yunohost/backup.py", line 745, in backup
method.mount_and_backup(self)
  File "/usr/lib/moulinette/yunohost/backup.py", line 1513, in mount_and_backup
self.backup()
  File "/usr/lib/moulinette/yunohost/backup.py", line 1733, in backup
shutil.copytree(source, dest)
  File "/usr/lib/python2.7/shutil.py", line 208, in copytree
raise Error, errors
shutil.Error: [('/opt/yunohost/seafile/ccnet/ccnet.sock', '/home/yunohost.app/fallback/fallback_backup/temp_fallback_backup/apps/seafile/backup/opt/yunohost/seafile/ccnet/ccnet.sock', "[Errno 6] No such device or address: '/opt/yunohost/seafile/ccnet/ccnet.sock'")]

  Debian GNU/Linux 9 (stretch)

  Linux nsXXXXX.ip-XX-XXX-XXX.eu 4.19-ovh-xxxx-std-ipv6-64 #1079069 SMP Mon Jan 20 08:31:48 UTC 2020 x86_64 GNU/Linux

  Server : XXXXX
  IPv4 : XXX.XXX.XXX.XXX
  IPv6 : XXXXXXXXXXXXXX
  Hostname : nsXXXXX.ip-XXX-XXX-XXX.eu

bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
sending incremental file list
.d..t...... backup/
<f..t...... backup/app_list
<f..t...... backup/config.conf
<f..t...... backup/ip_main_server
<f.st...... backup/nextcloud_fallback_bck.tar.gz
<f.st...... backup/roundcube_fallback_bck.tar.gz
<f.st...... backup/system_fallback_bck.tar.gz

Number of files: 10 (reg: 9, dir: 1)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 6
Total file size: 293.55M bytes
Total transferred file size: 194.09M bytes
Literal data: 102.73M bytes
Matched data: 91.36M bytes
File list size: 0
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 102.80M
Total bytes received: 166.82K

sent 102.80M bytes received 166.82K bytes 7.10M bytes/sec
total size is 293.55M speedup is 2.85

```

Fallback is using the yunohost backup moulinette, right ? Maybe i should ask to a yunohost dev ?

Thanks for your help

---

<div class="post-metadata">

**Author:** ![Maniack\_Crudelis](https://forum.yunohost.org/user_avatar/forum.yunohost.org/maniack_crudelis/32/13_2.png) [@Maniack\_Crudelis](https://forum.yunohost.org/u/Maniack_Crudelis)\
**Post date:** [February 19, 2020, 11:07am UTC](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482/66 "2020-02-19T11:07:24Z")

</div>

That’s an error on seafile side, as you can see, the error is

```auto
[Errno 6] No such device or address: '/opt/yunohost/seafile/ccnet/ccnet.sock'

```

And indeed, the backup can’t usually backup a socket, which is not a standard file.  
You should open an issue on seafile repo to ask for a fix.

> **[YunoHost-Apps/seafile\_ynh](https://github.com/YunoHost-Apps/seafile_ynh/issues)**
>
> Seafile package for YunoHost. Contribute to YunoHost-Apps/seafile\_ynh development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![MonsterChips](https://forum.yunohost.org/user_avatar/forum.yunohost.org/monsterchips/32/2572_2.png) [@MonsterChips](https://forum.yunohost.org/u/MonsterChips)\
**Post date:** [February 19, 2020, 3:32pm UTC](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482/67 "2020-02-19T15:32:02Z")

</div>

Ok i’ll see that.  
Thanks for your help

---

<div class="post-metadata">

**Author:** ![zero1Dre](https://forum.yunohost.org/user_avatar/forum.yunohost.org/zero1dre/32/1014_2.png) [@zero1Dre](https://forum.yunohost.org/u/zero1Dre)\
**Post date:** [January 19, 2021, 11:47am UTC](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482/68 "2021-01-19T11:47:55Z")

</div>

Hi everyone and @Maniack_Crudelis,

Today I realised that the app is no longer maintained. I had to reinstall it and it no longer works at all… Are there any further plans?  
Does anyone use a different way to maintain a fallback server?

Many thanks!

---

<div class="post-metadata">

**Author:** ![Maniack\_Crudelis](https://forum.yunohost.org/user_avatar/forum.yunohost.org/maniack_crudelis/32/13_2.png) [@Maniack\_Crudelis](https://forum.yunohost.org/u/Maniack_Crudelis)\
**Post date:** [January 19, 2021, 12:07pm UTC](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482/69 "2021-01-19T12:07:22Z")

</div>

I still use that app for my personnal server, but I didn’t check it recently.  
Could you tell me what was the error ?

---

<div class="post-metadata">

**Author:** ![zero1Dre](https://forum.yunohost.org/user_avatar/forum.yunohost.org/zero1dre/32/1014_2.png) [@zero1Dre](https://forum.yunohost.org/u/zero1Dre)\
**Post date:** [January 19, 2021, 12:35pm UTC](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482/70 "2021-01-19T12:35:58Z")

</div>

Hi,  
Thanks for your reply.  
I’m having this:

```
usage: yunohost {backup} ...
               [-h] [--output-as {json,plain,none}] [--debug] [--quiet]
               [--timeout ==SUPPRESS==] [-v]
yunohost: error: unrecognized arguments: --no-compress

```

I’ve deleted the --no-compress in send\_backup.sh but that hasn’t helped either.

Any ideas would be much appreciated.

---

<div class="post-metadata">

**Author:** ![Maniack\_Crudelis](https://forum.yunohost.org/user_avatar/forum.yunohost.org/maniack_crudelis/32/13_2.png) [@Maniack\_Crudelis](https://forum.yunohost.org/u/Maniack_Crudelis)\
**Post date:** [January 19, 2021, 1:38pm UTC](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482/71 "2021-01-19T13:38:16Z")

</div>

That the same issue as for Archivist…  
I’ll fix it, I need it as well

---

<div class="post-metadata">

**Author:** ![zero1Dre](https://forum.yunohost.org/user_avatar/forum.yunohost.org/zero1dre/32/1014_2.png) [@zero1Dre](https://forum.yunohost.org/u/zero1Dre)\
**Post date:** [January 19, 2021, 3:12pm UTC](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482/72 "2021-01-19T15:12:54Z")

</div>

Thank you. Looking forward to your update. As I’ve said before, I don’t know how others do it.

---

<div class="post-metadata">

**Author:** ![Maniack\_Crudelis](https://forum.yunohost.org/user_avatar/forum.yunohost.org/maniack_crudelis/32/13_2.png) [@Maniack\_Crudelis](https://forum.yunohost.org/u/Maniack_Crudelis)\
**Post date:** [January 20, 2021, 7:46pm UTC](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482/73 "2021-01-20T19:46:59Z")

</div>

Fix available on this branch [Fix YunoHost 4.1 by maniackcrudelis · Pull Request #23 · YunoHost-Apps/fallback\_ynh · GitHub](https://github.com/YunoHost-Apps/fallback_ynh/pull/23)

To be tested though…

---

<div class="post-metadata">

**Author:** ![zero1Dre](https://forum.yunohost.org/user_avatar/forum.yunohost.org/zero1dre/32/1014_2.png) [@zero1Dre](https://forum.yunohost.org/u/zero1Dre)\
**Post date:** [January 25, 2021, 10:39am UTC](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482/74 "2021-01-25T10:39:25Z")

</div>

I apologise for the late reply.  
How can I test it please?

---

<div class="post-metadata">

**Author:** ![tituspijean](https://forum.yunohost.org/user_avatar/forum.yunohost.org/tituspijean/32/3584_2.png) [@tituspijean](https://forum.yunohost.org/u/tituspijean)\
**Post date:** [January 25, 2021, 10:40am UTC](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482/75 "2021-01-25T10:40:58Z")

</div>

With the command line:

```bash
yunohost app upgrade fallback -u https://github.com/YunoHost-Apps/fallback_ynh/tree/fix_41 --force

```

🤞

---

<div class="post-metadata">

**Author:** ![zero1Dre](https://forum.yunohost.org/user_avatar/forum.yunohost.org/zero1dre/32/1014_2.png) [@zero1Dre](https://forum.yunohost.org/u/zero1Dre)\
**Post date:** [January 25, 2021, 10:52am UTC](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482/76 "2021-01-25T10:52:57Z")

</div>

Excellent, thank you!  
Will get back here as soon as I’m done.

---

<div class="post-metadata">

**Author:** ![zero1Dre](https://forum.yunohost.org/user_avatar/forum.yunohost.org/zero1dre/32/1014_2.png) [@zero1Dre](https://forum.yunohost.org/u/zero1Dre)\
**Post date:** [January 25, 2021, 11:36am UTC](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482/77 "2021-01-25T11:36:33Z")

</div>

So far so good.

> **Info:** Now upgrading fallback…
> 
> **Info:** [++…] \> Loading installation settings…
> 
> **Info:** [##+…] \> Ensuring downward compatibility…
> 
> **Info:** [###+++…] \> Backing up the app before upgrading (may take a while)…
> 
> **Info:** [######++…] \> Upgrading source files…
> 
> **Warning:** lsof: WARNING: can’t stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
> 
> **Warning:** Output information may be incomplete.
> 
> **Info:** [########++++++…] \> Upgrading dependencies…
> 
> **Warning:** lsof: WARNING: can’t stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
> 
> **Warning:** Output information may be incomplete.
> 
> **Warning:** lsof: WARNING: can’t stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
> 
> **Warning:** Output information may be incomplete.
> 
> **Warning:** lsof: WARNING: can’t stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
> 
> **Warning:** Output information may be incomplete.
> 
> **Info:** [##############+…] \> Reconfiguring Fallback…
> 
> **Info:** [###############…] \> Updating the cron…
> 
> **Warning:** grep: /etc/yunohost/apps/fallback/status.json: No such file or directory
> 
> **Info:** [###############++…] \> Upgrading logrotate configuration…
> 
> **Warning:** grep: /etc/yunohost/apps/fallback/status.json: No such file or directory
> 
> **Warning:** grep: /etc/yunohost/apps/fallback/status.json: No such file or directory
> 
> **Warning:** Unable to build the changelog…
> 
> **Info:** [####################] \> Upgrade of fallback completed
> 
> **Success!** fallback upgraded
> 
> **Success!** Upgrade complete

Not sure why I get the initial warnings (I always get them so not an issue here).  
I’ve now launched an backup with send\_process.sh \> waiting for result.

---

<div class="post-metadata">

**Author:** ![zero1Dre](https://forum.yunohost.org/user_avatar/forum.yunohost.org/zero1dre/32/1014_2.png) [@zero1Dre](https://forum.yunohost.org/u/zero1Dre)\
**Post date:** [January 25, 2021, 11:51am UTC](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482/78 "2021-01-25T11:51:55Z")

</div>

OK here are some results @Maniack_Crudelis and @tituspijean

(excerpts from the log file)

App save failed :

```
> Make a temporary backup for agendav_fallback_bck
>> This backup is different than the previous one
>>> Make a real backup for agendav_fallback_bck
Collecting files to be backed up for agendav...
Could not back up agendav
Traceback (most recent call last):
  File "/usr/bin/yunohost", line 72, in <module>
    parser=parser
  File "/usr/lib/moulinette/yunohost/ __init__.py", line 29, in cli
    top_parser=parser
  File "/usr/lib/python2.7/dist-packages/moulinette/ __init__.py", line 120, in cli
    args, output_as=output_as, timeout=timeout
  File "/usr/lib/python2.7/dist-packages/moulinette/interfaces/cli.py", line 477, in run
    ret = self.actionsmap.process(args, timeout=timeout)
  File "/usr/lib/python2.7/dist-packages/moulinette/actionsmap.py", line 592, in process
    return func(**arguments)
  File "/usr/lib/moulinette/yunohost/backup.py", line 2056, in backup_create
    backup_manager.collect_files()
  File "/usr/lib/moulinette/yunohost/backup.py", line 507, in collect_files
    self._collect_apps_files()
  File "/usr/lib/moulinette/yunohost/backup.py", line 639, in _collect_apps_files
    self._collect_app_files(app_instance_name)
  File "/usr/lib/moulinette/yunohost/backup.py", line 716, in _collect_app_files
    filesystem.rm(tmp_script, force=True)
UnboundLocalError: local variable 'tmp_script' referenced before assignment
./send_backup.sh: line 137: ynh_compress_backup: command not found
>>>> Encryption of agendav_fallback_bck
ccrypt: /home/yunohost.app/fallback/fallback_backup/backup/agendav_fallback_bck.tar.gz: No such file or directory

```

System backup failed too:

```
> Make a temporary backup for system_fallback_bck
>> This backup is different than the previous one
>>> Make a real backup for system_fallback_bck
The backup hook 'conf_ynh_mysql' is unknown
[Error] Destination path 'conf/ldap/ldap.conf' already exist
Could not run script: /usr/share/yunohost/hooks/backup/05-conf_ldap
[Error] Destination path 'conf/ssowat' already exist
Could not run script: /usr/share/yunohost/hooks/backup/14-conf_ssowat
[Error] Destination path 'conf/ynh/certs' already exist
Could not run script: /usr/share/yunohost/hooks/backup/21-conf_ynh_certs
[Error] Destination path 'data/mail' already exist
Could not run script: /usr/share/yunohost/hooks/backup/23-data_mail
[Error] Destination path 'conf/xmpp/etc' already exist
Could not run script: /usr/share/yunohost/hooks/backup/26-conf_xmpp
[Error] Destination path 'conf/nginx' already exist
Could not run script: /usr/share/yunohost/hooks/backup/29-conf_nginx
[Error] Destination path 'conf/cron/yunohost' already exist
Could not run script: /usr/share/yunohost/hooks/backup/32-conf_cron
[Error] Destination path 'conf/ynh/current_host' already exist
Could not run script: /usr/share/yunohost/hooks/backup/40-conf_ynh_currenthost
Could not backup the 'data_mail' system part
Could not backup the 'conf_cron' system part
Could not backup the 'conf_ynh_certs' system part
Could not backup the 'conf_xmpp' system part
Could not backup the 'conf_ynh_currenthost' system part
Could not backup the 'conf_nginx' system part
Could not backup the 'conf_ssowat' system part
Could not backup the 'conf_ldap' system part

Nothing to save

./send_backup.sh: line 106: ynh_compress_backup: command not found
>>>> Encryption of system_fallback_bck
ccrypt: /home/yunohost.app/fallback/fallback_backup/backup/system_fallback_bck.tar.gz: No such file or directory

```

Hope this helps. Please let me know if I can do anything else.

---

<div class="post-metadata">

**Author:** ![Maniack\_Crudelis](https://forum.yunohost.org/user_avatar/forum.yunohost.org/maniack_crudelis/32/13_2.png) [@Maniack\_Crudelis](https://forum.yunohost.org/u/Maniack_Crudelis)\
**Post date:** [January 25, 2021, 12:08pm UTC](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482/79 "2021-01-25T12:08:38Z")

</div>

Your first error seems to be related to the backup of Agendav itself, either the backup script of the app or an error with YunoHost.

You should try to backup the app manually from the admin panel or CLI to see if that script works.

The second one for the core is a common error, aparently never fixed…  
If YunoHost fails a backup for whatever reason, you’re screw for any other backup you want to do afterward…

Clean the content of `/home/yunohost.backup/tmp/` to fix that second error.

---

<div class="post-metadata">

**Author:** ![zero1Dre](https://forum.yunohost.org/user_avatar/forum.yunohost.org/zero1dre/32/1014_2.png) [@zero1Dre](https://forum.yunohost.org/u/zero1Dre)\
**Post date:** [January 25, 2021, 12:15pm UTC](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482/80 "2021-01-25T12:15:07Z")

</div>

> [@Maniack\_Crudelis](#):
>
> You should try to backup the app manually from the admin panel or CLI to see if that script works.

OK, script works.

Checked /home/yunohost.backup/tmp = empty

Launching \> ./send\_backup.sh again.

---

<div class="post-metadata">

**Author:** ![Maniack\_Crudelis](https://forum.yunohost.org/user_avatar/forum.yunohost.org/maniack_crudelis/32/13_2.png) [@Maniack\_Crudelis](https://forum.yunohost.org/u/Maniack_Crudelis)\
**Post date:** [January 25, 2021, 12:56pm UTC](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482/81 "2021-01-25T12:56:34Z")

</div>

> [@zero1Dre](#):
>
> `The backup hook 'conf_ynh_mysql' is unknown`

I was quite sure I did remove that already…  
But it was in Archivist, not in this one !

[Previous page](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482.md?page=3)

[Next page](https://forum.yunohost.org/t/fallback-backup-and-restore-automatically-your-server/3482.md?page=5)
