Symbolic link to usb drive... Help

My YunoHost server

Hardware: VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / …
YunoHost version: latest
I have access to my server : Through SSH | through the webadmin | direct access via keyboard / screen | …
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no / yes
If yes, please explain:

Description of my issue

Hello all

I’m trying to create a symbolic link from /home/yunohost.backup/archives to a USB drive that is mounted at /media/ynhrecovery (The drive is mounted and does work!)

The idea is that when I do a YNH backup the backup goes to /media/ynhrecovery instead of the default: /home/yunohost.backup/archives

So I did the following:

ln -s /home/yunohost.backups/archives/ /media/ynhrecovery

Straight to the prompt. Good. I tested using:

ls -l /media/ynhrecovery

The following was returned:

-rw-r--r-- 1 root root         4343 Oct 12 17:17
-rw-r--r-- 1 root root 191402393600 Oct 12 18:02 20221011-202248.tar
lrwxrwxrwx 1 root root           32 Oct 12 18:22 archives -> /home/yunohost.backups/archives/
drwx------ 2 root root        16384 Oct 12 17:08 lost+found

(The two backups already there I did manually using the cp command)

I saw archives → /home/yunohost.backup/archives

I then tried a backup of one of my apps and looked on the USB drive but it wasn’t there, it had been saved to the default directory /home/yunohost.backups/archives/

What did I miss or do wrong? Do I need to restart after?

Many thanks


You need to delete the archives folder located in /home/yunohost.backups/
and create the link

ln -s /media/ynhrecovery /home/yunohost.backups/archives

@mib thanks for your reply. Sadly that didn’t work.

ln -s /media/ynhrecovery /home/yunohost.backups/archives


ln: failed to create symbolic link '/home/yunohost.backups/archives': No such file or directory

That’s because the directory archive has been deleted?



There is no s in the name of the backups folder, so the command must be :

ln -s /media/ynhrecovery /home/yunohost.backup/archives
1 Like

Oh yes I see that now.

So just to be sure. Sorry to be a pain. I have to delete the archives folder first inside home/yunohost.backup ?

Then do

ln -s /media/ynhrecovery/ home/yunohost.backup/archive

Even though the archive folder has been deleted.

Bit new to symlinks so still learning

Thanks again


Yes, that’s right.
Don’t forget to go to resolution

@mib thanks very much again.

I’ll give that a try later and let you know how I get in. Appreciate your time.


@mib Bingo…! it worked…

I couldnt get it to work becuse I’m a dunce. I was creating the sybolic link in the wong place!
I deleted the archive folder in /home/yunohost.backup/ then in the same directory I created the symlink as follows:

ln -s /media/ynhrecovery/ /home/yunohost.backup/archives

I was always getting an error that the directory couldn’t be found, however, if I created the symbolic link in the /media/ynhrecovery/ directory it worked perfectly. backups are now going straight to my USB drive.

Thanks for your help with this, I think I now understand symlinks better.


1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.