# \[Archivist\] Backup your server with rsync

**URL:** https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747
**Category:** Apps
**Tags:** archivist
**Created:** [November 3, 2017, 5:03pm UTC](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747 "2017-11-03T17:03:37Z")
**Posts on this page:** 20
**Page:** 4

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [November 21, 2020, 3:43pm UTC](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747/61 "2020-11-21T15:43:45Z")

</div>

> [@pcet](#):
>
> J’ai supprimé le contenu de ssh\_config qui avait les memes règles que sshd\_config ce qui apparemment n’est pas normal/utile

Oui car la conf ssh\_config fait référence à la conf _client_ (et sshd la conf _serveur_), donc relative à ce qu’il se passe si tu essayes de te connecter à un serveur depuis cette machine. Ca n’a effectivement probablement pas de sens apriori d’y trouver les memes noms d’options que dans la conf serveur

---

<div class="post-metadata">

### Author: ![Cyril](https://forum.yunohost.org/user_avatar/forum.yunohost.org/cyril/32/219_2.png) [@Cyril](https://forum.yunohost.org/u/Cyril)
#### Post date: [January 11, 2021, 7:16am UTC](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747/62 "2021-01-11T07:16:41Z")

</div>

## 🇬🇧/🇺🇸

Hello,  
It seems to me that archivists do not really appreciate the changes concerning the compression of archive

## 🇫🇷

Bonjour,  
Il me semble qu’archiviste n’apprécie pas trop les changements concernant la compression des archives :

> Build list of files to backup  
> Password has been changed.  
> md5sum: na: Aucun fichier ou dossier de ce type  
> Compress backups

> Backup YunoHost core and apps  
> Make a temporary backup for agendav\_backup  
> usage: yunohost {backup} …  
> [-h] [–output-as {json,plain,none}] [–debug] [–quiet]  
> [–timeout ==SUPPRESS==] [-v]  
> yunohost: error: unrecognized arguments: --no-compress

## 🇬🇧/🇺🇸

I tried to remove the --no-compress command from the archivist.sh file, but it’s not that easy …

## 🇫🇷

J’ai essayé de supprimer la commande --no-compress du fichier archiviste.sh, mais ce n’est pas aussi simple …

---

<div class="post-metadata">

### Author: ![pcet](https://forum.yunohost.org/user_avatar/forum.yunohost.org/pcet/32/4200_2.png) [@pcet](https://forum.yunohost.org/u/pcet)
#### Post date: [January 11, 2021, 7:46am UTC](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747/63 "2021-01-11T07:46:20Z")

</div>

J’ai exactement le même soucis !

---

<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 11, 2021, 11:47am UTC](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747/64 "2021-01-11T11:47:11Z")

</div>

> [@Cyril](#):
>
> Il me semble qu’archiviste n’apprécie pas trop les changements concernant la compression des archives :

Indeed…  
Work in progress here [Allow to choose the compression algorithm by maniackcrudelis · Pull Request #12 · mcrudelis/archivist · GitHub](https://github.com/maniackcrudelis/archivist/pull/12)

---

<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 12, 2021, 5:57pm UTC](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747/65 "2021-01-12T17:57:29Z")

</div>

Fixed by this PR [Fix YunoHost 4.1 by maniackcrudelis · Pull Request #29 · YunoHost-Apps/archivist\_ynh · GitHub](https://github.com/YunoHost-Apps/archivist_ynh/pull/29)

You can also choose not to compress your backups or with which algorithm you want to do it.

---

<div class="post-metadata">

### Author: ![pcet](https://forum.yunohost.org/user_avatar/forum.yunohost.org/pcet/32/4200_2.png) [@pcet](https://forum.yunohost.org/u/pcet)
#### Post date: [January 12, 2021, 8:27pm UTC](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747/66 "2021-01-12T20:27:48Z")

</div>

Merci !

### FR

Par contre j’obtiens ce message d’erreur lorsque je veux me rendre sur le config-panel :  
`Erreur lors de l'analyse de l'argument de mot de passe 'YNH_CONFIG_MAIN_ENCRYPTION_ENCRYPTION_PWD' : l'argument de mot de passe ne peut pas avoir de valeur par défaut pour des raisons de sécurité`

**Je précise que je n’utilise pas le chiffrement pour les sauvegardes.**

### ENG

On the other hand I get this error message when I want to go to the config-panel :  
`Erreur lors de l'analyse de l'argument de mot de passe 'YNH_CONFIG_MAIN_ENCRYPTION_ENCRYPTION_PWD' : l'argument de mot de passe ne peut pas avoir de valeur par défaut pour des raisons de sécurité`

**I specify that I do not use encryption for backups.**

## logs : [hastebin](https://paste.yunohost.org/mujisikufe.bash)

---

<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 12, 2021, 9:03pm UTC](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747/67 "2021-01-12T21:03:09Z")

</div>

Seen that too, reported here [Broken config-panel · Issue #1709 · YunoHost/issues · GitHub](https://github.com/YunoHost/issues/issues/1709) with 2 PR ongoing to fix it.

By the way, glad to know some users are actually using those features. I ended up thinking no one would ever use it…

Also, since it doesn’t work, I haven’t tested the new options in the config-panel.

---

<div class="post-metadata">

### Author: ![Cyril](https://forum.yunohost.org/user_avatar/forum.yunohost.org/cyril/32/219_2.png) [@Cyril](https://forum.yunohost.org/u/Cyril)
#### Post date: [January 14, 2021, 7:28am UTC](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747/68 "2021-01-14T07:28:40Z")

</div>

It’s working better now !

Thanks !

---

<div class="post-metadata">

### Author: ![Cyril](https://forum.yunohost.org/user_avatar/forum.yunohost.org/cyril/32/219_2.png) [@Cyril](https://forum.yunohost.org/u/Cyril)
#### Post date: [May 18, 2021, 6:30pm UTC](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747/69 "2021-05-18T18:30:43Z")

</div>

Hello,  
While working on Borg to understand how it works, I’m trying to improve my backup system.

I’ve attached a NAS to my main yunohost server and run a script that contain the following, 2 hours after archivist.sh (I added a line in /etc/cron.d/archivist) :

> rsync -avzh -e ssh [user@serverB.fr](mailto:user@serverB.fr):/home/yunohost.app/archivist/backup/ “/mnt/NAS/backup/srvB”

> rsync -avh /home/yunohost.app/archivist/backup/ “/mnt/NAS/backup/SrvA”

The first line retrieves the archival backup from a remote server and copies it to my NAS and the second line takes the local backup and copies it to my NAS.

Is there a more elegant way to do it ?

Another question, in archivist log I can see :

> Erreur : Script de sauvegarde ‘conf\_ssh’ inconnu  
> Erreur : Script de sauvegarde ‘conf\_ssowat’ inconnu  
> Erreur : Script de sauvegarde ‘conf\_ynh\_firewall’ inconnu  
> Erreur : Script de sauvegarde ‘conf\_xmpp’ inconnu  
> Erreur : Script de sauvegarde ‘conf\_nginx’ inconnu  
> Erreur : Script de sauvegarde ‘conf\_cron’ inconnu  
> Erreur : Script de sauvegarde ‘conf\_ynh\_currenthost’ inconnu

Is this a problem?

---

<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: [May 18, 2021, 7:06pm UTC](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747/70 "2021-05-18T19:06:54Z")

</div>

> [@Cyril](#):
>
> Is this a problem?

Probably again a modification of the backup command… Again…  
Could you please open an issue about that, so I can have a look to it when I have some time…

Not sure to get the idea of your rsync commands, if you need to send your backup to multiple places, archivist can do it, you just have to add multiple recipients.

---

<div class="post-metadata">

### Author: ![Cyril](https://forum.yunohost.org/user_avatar/forum.yunohost.org/cyril/32/219_2.png) [@Cyril](https://forum.yunohost.org/u/Cyril)
#### Post date: [May 19, 2021, 4:20pm UTC](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747/71 "2021-05-19T16:20:40Z")

</div>

Yes sure, I’ll do that.

You are right, I can use seeders to send the backup to my NAS via my local Yunohost server. I was trying to make something complex that can be simple… as usual… 😄

---

<div class="post-metadata">

### Author: ![pcet](https://forum.yunohost.org/user_avatar/forum.yunohost.org/pcet/32/4200_2.png) [@pcet](https://forum.yunohost.org/u/pcet)
#### Post date: [May 20, 2021, 6:26am UTC](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747/72 "2021-05-20T06:26:19Z")

</div>

> [@Cyril](#):
>
> Another question, in archivist log I can see :
> 
> > Erreur : Script de sauvegarde ‘conf\_ssh’ inconnu  
> > Erreur : Script de sauvegarde ‘conf\_ssowat’ inconnu  
> > Erreur : Script de sauvegarde ‘conf\_ynh\_firewall’ inconnu  
> > Erreur : Script de sauvegarde ‘conf\_xmpp’ inconnu  
> > Erreur : Script de sauvegarde ‘conf\_nginx’ inconnu  
> > Erreur : Script de sauvegarde ‘conf\_cron’ inconnu  
> > Erreur : Script de sauvegarde ‘conf\_ynh\_currenthost’ inconnu
> 
> Is this a problem?

I have the same messages since the last yunohost update (4.2)

---

<div class="post-metadata">

### Author: ![Cyril](https://forum.yunohost.org/user_avatar/forum.yunohost.org/cyril/32/219_2.png) [@Cyril](https://forum.yunohost.org/u/Cyril)
#### Post date: [May 20, 2021, 6:47am UTC](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747/73 "2021-05-20T06:47:58Z")

</div>

> [@pcet](#):
>
> I have the same messages since the last yunohost update (4.2)

I add an issue : [Issues · YunoHost-Apps/archivist\_ynh · GitHub](https://github.com/YunoHost-Apps/archivist_ynh/issues)

---

<div class="post-metadata">

### Author: ![Cyril](https://forum.yunohost.org/user_avatar/forum.yunohost.org/cyril/32/219_2.png) [@Cyril](https://forum.yunohost.org/u/Cyril)
#### Post date: [May 20, 2021, 4:42pm UTC](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747/74 "2021-05-20T16:42:08Z")

</div>

Hello,

I’m using the sender “local” to copy archivist backup to a local path.  
And I have the following error

> > Build the list of files for the recipient local example  
> > Copy backups files in /mnt/NASbck/backup/srv/.  
> > building file list … done  
> > rsync: chown “/mnt/NASbck/backup/srv/.” failed: Operation not permitted (1)  
> > rsync: delete\_file: unlink(enc\_backup\_list) failed: Permission denied (13)  
> > rsync: delete\_file: unlink(backup\_list) failed: Permission denied (13)  
> > rsync: delete\_file: unlink(.encfs6.xml.encrypted.cpt) failed: Permission denied (13)  
> > rsync: delete\_file: unlink(.encfs6.xml) failed: Permission denied (13)  
> > .d…t.og… ./  
> > rsync: chown “/mnt/NASbck/backup/srv/ynh\_backup” failed: Operation not permitted (1)

It’s working manually if I don’t use sudo.  
To which user should I give permission to the destination folder ?

🤦‍♂️ Maybe I should just remove sudo from “local.sender.sh” …

---

<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: [May 20, 2021, 5:08pm UTC](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747/75 "2021-05-20T17:08:32Z")

</div>

The cron task use root.

I don’t remember why I did put a sudo in the first place…

---

<div class="post-metadata">

### Author: ![Cyril](https://forum.yunohost.org/user_avatar/forum.yunohost.org/cyril/32/219_2.png) [@Cyril](https://forum.yunohost.org/u/Cyril)
#### Post date: [May 27, 2021, 6:00am UTC](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747/76 "2021-05-27T06:00:23Z")

</div>

## 🇬🇧/🇺🇸

I think I’ve found the reason why Archivist’s rsync doesn’t work as expected in my case. And, as I understand it, this can happen with any application that has interaction with files.

On my yunohost server, I have mapped a network share to NFS.  
By default, on a file server with an NFS service, there is a `rootsquash` security option which makes root on a client system have the same privileges as the `nobody` user.

So, using `sudo` gives low-level access to the NFS share.  
There is a `No-Root-squash` option that exists in the NFS share configuration on the server side, but on my old NETGEAR Duo NAS, I don’t have access to this option …

I have configured the NFS rights on my NAS differently (I checked: guest has full access).

Now the archivist sender “rsync via ssh” from my remote Yunohost server to the local server works fine.  
But the “local” archivist sender, on my local server, still gives me errors on the chown, mkdir and mkstemp commands that Rsync is trying to run.

```
rsync: chown "/mnt/NASbck/backup/srva/." failed: Operation not permitted (1)
rsync: recv_generator: mkdir "/mnt/NASbck/backup/srva/ynh_backup" failed: Permission denied (13)
rsync: mkstemp "/mnt/NASbck/backup/srva/ynh_backup/.agendav_backup.tar.gz.ZRJzQ1" failed: Permission denied (13)

```

I tried removing `sudo` before the `rsync` command in the local sender, but the result is the same.

Is there a solution?  
Maybe I should go through a CIFS share …

Source :  
([https://askubuntu.com/questions/657464/rsync-from-local-folder-to-mounted-nfs-share-causes-permission-denied-errors-and](https://askubuntu.com/questions/657464/rsync-from-local-folder-to-mounted-nfs-share-causes-permission-denied-errors-and))

## 🇫🇷/🇫🇷

Je pense avoir trouvé la raison pour laquelle rsync d’Archiviste ne fonctionne pas comme prévu dans mon cas. Et, si j’ai bien compris, cela peut arriver avec n’importe quelle application qui a une interaction avec des fichiers.

Sur mon serveur yunohost, j’ai mappé un partage réseau avec NFS.  
Par défaut, sur un serveur de fichiers avec un service NFS, il y a une option de sécurité `rootsquash` qui fait que root sur un système client a les mêmes privilèges que l’utilisateur `nobody`.

Donc, l’utilisation de `sudo` donne un accès avec peu de droits sur le partage NFS.  
Il y a bien une option `No-Root-squash` qui existe dans la configuration du partage NFS, côté serveur, mais sur mon vieux NAS NETGEAR Duo, je n’ai pas accès à cette option …

J’ai configuré différemment les droits NFS sur mon NAS (j’ai coché : invité a un accès complet).

Maintenant, le sender d’archiviste “rsync via ssh” de mon serveur Yunohost distant vers le serveur local fonctionne bien.  
Mais le sender d’archiviste “local”, sur mon serveur local, me donne encore des erreurs sur les commandes chown, mkdir et mkstemp que Rsync cherche à lancer.

```
rsync: chown "/mnt/NASbck/backup/srva/." failed: Operation not permitted (1)
rsync: recv_generator: mkdir "/mnt/NASbck/backup/srva/ynh_backup" failed: Permission denied (13)
rsync: mkstemp "/mnt/NASbck/backup/srva/ynh_backup/.agendav_backup.tar.gz.ZRJzQ1" failed: Permission denied (13)

```

J’ai essayé en retirant `sudo` devant la commande `rsync` dans le sender local, mais le résultat est le même.

Est-ce qu’il existe une solution ?  
Il vaut peut-être mieux que je passe par un partage CIFS …

Source :  
([https://askubuntu.com/questions/657464/rsync-from-local-folder-to-mounted-nfs-share-causes-permission-denied-errors-and](https://askubuntu.com/questions/657464/rsync-from-local-folder-to-mounted-nfs-share-causes-permission-denied-errors-and))

---

<div class="post-metadata">

### Author: ![Cyril](https://forum.yunohost.org/user_avatar/forum.yunohost.org/cyril/32/219_2.png) [@Cyril](https://forum.yunohost.org/u/Cyril)
#### Post date: [May 30, 2021, 3:55pm UTC](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747/77 "2021-05-30T15:55:42Z")

</div>

🇫🇷

Ça marche mieux avec un partage CIFS  
Je n’ai plus de message d’erreur !

🇬🇧/🇺🇸

It works better with a CIFS share  
I don’t get any more error messages!

---

<div class="post-metadata">

### Author: ![Cyril](https://forum.yunohost.org/user_avatar/forum.yunohost.org/cyril/32/219_2.png) [@Cyril](https://forum.yunohost.org/u/Cyril)
#### Post date: [June 3, 2021, 5:37am UTC](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747/78 "2021-06-03T05:37:02Z")

</div>

No more error message after the udpate.

Thanks !

---

<div class="post-metadata">

### Author: ![frittro](https://forum.yunohost.org/user_avatar/forum.yunohost.org/frittro/32/5284_2.png) [@frittro](https://forum.yunohost.org/u/frittro)
#### Post date: [January 2, 2022, 5:40pm UTC](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747/79 "2022-01-02T17:40:29Z")

</div>

Sorry for the necropost. I plan to use [![borg_80px](https://forum.yunohost.org/uploads/default/original/2X/d/dce7c8d920dbfe90eb7370ebf943976502f9998f.png) Borg Backup](https://forum.yunohost.org/t/borg-borg-server-deduplicated-encrypted-and-remote-backups/5006) once I have completed several other steps in [my YNH deployment project](https://forum.yunohost.org/t/an-autistic-approach-to-installing-yunohost-warning-lots-of-graphics/18057/), but until that is installed I intend to use `rsync` for several backups, including one right at the very start of my project, when the only thing that I will have accomplished by then is burning the ![yunohost_80px](https://forum.yunohost.org/uploads/default/original/2X/0/03e706e65f8dcd5fd28c83d1e0ee68706ef83f31.png) YunoHost v4.1.7.2 iso image onto the µSD-card, even before the initial booting of YunoHost, before I have even run **`yunohost tools postinstall`** on it. I want to take several backups even before the stage that I’ll be able to install apps such as Archivist. Can someone please advise me on using `rsync` manually from the terminal, without any scripts involved, just plain CLI instructions? I assume that I would need to ssh into the YunoHost machine (I’m running YNH on a ![raspberrypi_80px](https://forum.yunohost.org/uploads/default/original/2X/e/e405b6b4eeac99abccfde5e60d10f1d9976d72b8.png) Raspberry Pi 4) from my laptop (which is running ![ubuntu_80px](https://forum.yunohost.org/uploads/default/original/2X/9/94d423ea2e0f3cd944b2cebf26e1666f891ca744.png) Ubuntu), and execute the commands from there, right? I’m not yet confident with `rsync`, but I am sure it is possible to do this from the terminal, without having to install anything else. Is that right?

---

<div class="post-metadata">

### Author: ![Cyril](https://forum.yunohost.org/user_avatar/forum.yunohost.org/cyril/32/219_2.png) [@Cyril](https://forum.yunohost.org/u/Cyril)
#### Post date: [January 13, 2023, 1:23pm UTC](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747/80 "2023-01-13T13:23:10Z")

</div>

Oupss, I just figured out, that this is an old post …  
Sorry

Hello @frittro,  
if you want to use rsync manually, you’ll a lot of example on some webpages. Search with DuckDuckGo or Qwant for “rsync ssh”, and you’ll find pages like these : [https://linuxize.com/post/how-to-transfer-files-with-rsync-over-ssh/](https://linuxize.com/post/how-to-transfer-files-with-rsync-over-ssh/)  
[https://linuxize.com/post/how-to-transfer-files-with-rsync-over-ssh/https://linuxize.com/post/how-to-transfer-files-with-rsync-over-ssh/](https://linuxize.com/post/how-to-transfer-files-with-rsync-over-ssh/https://linuxize.com/post/how-to-transfer-files-with-rsync-over-ssh/)

Good luck,  
Cyril

> **[How to Transfer Files with Rsync over SSH {With Examples}](https://phoenixnap.com/kb/how-to-rsync-over-ssh)**
>
> Follow this guide to copy files with rsync over SSH, with examples. Learn how to transfer directories and subdirectories with rsync to a remote machine.

[Previous page](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747.md?page=3)

[Next page](https://forum.yunohost.org/t/archivist-backup-your-server-with-rsync/3747.md?page=5)
