# Trying to migrate node from a server to a Raspberry Pi 4 8gb, struggling with rsync

**URL:** <https://forum.storj.io/t/trying-to-migrate-node-from-a-server-to-a-raspberry-pi-4-8gb-struggling-with-rsync/22228>\
**Category:** Node Operators\
**Tags:** move-node\
**Created:** [April 9, 2023, 2:45am UTC](https://forum.storj.io/t/trying-to-migrate-node-from-a-server-to-a-raspberry-pi-4-8gb-struggling-with-rsync/22228 "2023-04-09T02:45:06Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![tiaxthegrand](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/tiaxthegrand/32/7814_2.png) [@tiaxthegrand](https://forum.storj.io/u/tiaxthegrand)\
**Post date:** [April 9, 2023, 2:45am UTC](https://forum.storj.io/t/trying-to-migrate-node-from-a-server-to-a-raspberry-pi-4-8gb-struggling-with-rsync/22228/1 "2023-04-09T02:45:06Z")

</div>

I’ve been running a node for approximately 1 year and it is now full at 4.5Tb. It’s running on a 20c/40t rackmount server that is entirely unnecessary, so I’m trying to move it to my 6Tb disk attached to my Rpi. I followed the installation directions exactly for the installation on the server and the pi.

I have gotten to the point where I can SSH into either machine from the other, and at the point in the installation-for-rpi directions where I would create an identity. Rsync is installed on both machines. I think my problem is mostly my inexperience with Linux in general, but when I SSH into either machine from the other and run the command ‘rsync -aP /mnt/storj/identity/storagenode/ /mnt/storj2/storagenode-new/identity/’, I get

rsync: change+dir “/mnt/storj/identity” failed: No such file or directory (2)  
rsync: mkdir “/mnt/storj2/storagenode-new/identity” failed: No such files or directory (2)  
rsync error: error in file IO (code 11) at main.c(681) [Receiver=3.1.3]

I’m hoping someone can explain what’s going on, as I’m not sure why the files wouldn’t be there since I didn’t make any changes during installation. Am I missing part of the command that I’m supposed to fill in myself? I did some searching here and it seems like nobody is using the command specified in the documentation, and I don’t know enough to know what will work for me.

---

<div class="post-metadata">

**Author:** ![mars\_9t](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mars_9t/32/7823_2.png) [@mars\_9t](https://forum.storj.io/u/mars_9t)\
**Post date:** [April 9, 2023, 3:34am UTC](https://forum.storj.io/t/trying-to-migrate-node-from-a-server-to-a-raspberry-pi-4-8gb-struggling-with-rsync/22228/2 "2023-04-09T03:34:06Z")

</div>

You don’t first connect via ssh and then rsync. After connection, you are on the other machine. It doesn’t know about filesystem of the one that you are connecting from. What you need instead is to specify a “network path” like this:  
`rsync -aP ~/SourceDirectory/* username@192.168.1.XXX:~/Destination`

Take a look here (just a first link from google) for caveats and options:

> **[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.

> [@tiaxthegrand](#):
>
> and at the point in the installation-for-rpi directions where I would create an identity

You do know that since you already have a node, you shouldn’t create new identity, right?

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [April 9, 2023, 4:08am UTC](https://forum.storj.io/t/trying-to-migrate-node-from-a-server-to-a-raspberry-pi-4-8gb-struggling-with-rsync/22228/3 "2023-04-09T04:08:56Z")

</div>

Please execute the command

```auto
df -T --si

```

on each of the host and post result here.

Basically if your data and identity are in `/mnt/storj/storagenode/` on the server, and you do want to copy data to RaspberryPI to `/mnt/storj/storagenode`, you need to:

- ssh to the server
- run `screen` or `tmux`
- run command like described by @mars_9t:

```auto
rsync -aP /mnt/storj/storagenode/ username@192.168.1.XXX:/mnt/storj/storagenode/

```

here `username` is a user on your Raspi, and `192.168.1.XXX` its IP.

---

<div class="post-metadata">

**Author:** ![lyoth](https://storj.bcdn.literatehosting.com/letter_avatar/lyoth/32/6_449c533f586939b6e5f246632a46421f.png) [@lyoth](https://forum.storj.io/u/lyoth)\
**Post date:** [April 9, 2023, 4:45am UTC](https://forum.storj.io/t/trying-to-migrate-node-from-a-server-to-a-raspberry-pi-4-8gb-struggling-with-rsync/22228/4 "2023-04-09T04:45:55Z")

</div>

Why don’t you connect the usb harddrive to the server and transfer it directly over usb then connect it to your rpi when done.  
This should be a lot faster than trying to transfer it over network.

---

<div class="post-metadata">

**Author:** ![tiaxthegrand](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/tiaxthegrand/32/7814_2.png) [@tiaxthegrand](https://forum.storj.io/u/tiaxthegrand)\
**Post date:** [April 9, 2023, 1:03pm UTC](https://forum.storj.io/t/trying-to-migrate-node-from-a-server-to-a-raspberry-pi-4-8gb-struggling-with-rsync/22228/5 "2023-04-09T13:03:35Z")

</div>

Results from the pi-  
:~ $ df -T --si  
Filesystem Type Size Used Avail Use% Mounted on  
/dev/root ext4 15G 1.6G 13G 12% /  
devtmpfs devtmpfs 3.9G 0 3.9G 0% /dev  
tmpfs tmpfs 4.1G 0 4.1G 0% /dev/shm  
tmpfs tmpfs 1.7G 1.2M 1.7G 1% /run  
tmpfs tmpfs 5.3M 4.1k 5.3M 1% /run/lock  
/dev/mmcblk0p1 vfat 268M 33M 236M 13% /boot  
/dev/sda2 ext4 6.0T 29k 5.7T 1% /mnt/storj2  
tmpfs tmpfs 820M 0 820M 0% /run/user/1000

results from the server-  
~$ df -T --si  
Filesystem Type Size Used Avail Use% Mounted on  
udev devtmpfs 34G 0 34G 0% /dev  
tmpfs tmpfs 6.8G 2.5M 6.8G 1% /run  
/dev/sda2 ext4 5.0T 4.6T 139G 98% /  
tmpfs tmpfs 34G 0 34G 0% /dev/shm  
tmpfs tmpfs 5.3M 0 5.3M 0% /run/lock  
tmpfs tmpfs 34G 0 34G 0% /sys/fs/cgroup  
/dev/loop0 squashfs 132k 132k 0 100% /snap/bare/5  
/dev/loop1 squashfs 9.5M 9.5M 0 100% /snap/canonical-livepatch/164  
/dev/loop2 squashfs 11M 11M 0 100% /snap/canonical-livepatch/190  
/dev/loop3 squashfs 67M 67M 0 100% /snap/core20/1828  
/dev/loop7 squashfs 53M 53M 0 100% /snap/snapd/18357  
/dev/loop11 squashfs 49M 49M 0 100% /snap/snap-store/599  
/dev/loop4 squashfs 123M 123M 0 100% /snap/core/14946  
/dev/loop6 squashfs 67M 67M 0 100% /snap/core20/1852  
/dev/loop5 squashfs 49M 49M 0 100% /snap/snap-store/638  
/dev/loop8 squashfs 86M 86M 0 100% /snap/gtk-common-themes/1534  
/dev/loop13 squashfs 364M 364M 0 100% /snap/gnome-3-38-2004/119  
/dev/loop12 squashfs 53M 53M 0 100% /snap/snapd/18596  
/dev/loop9 squashfs 123M 123M 0 100% /snap/core/14784  
/dev/loop14 squashfs 97M 97M 0 100% /snap/gtk-common-themes/1535  
/dev/loop10 squashfs 367M 367M 0 100% /snap/gnome-3-38-2004/137  
/dev/sda1 vfat 536M 6.4M 530M 2% /boot/efi  
tmpfs tmpfs 6.8G 78k 6.8G 1% /run/user/1000

I seem to have figured out the path to the original identity just by copying the stated location from the original installation directions ~/.local/share/storj/identity/storagenode/\*

But I cannot figure out what needs to be the path for the destination. user@192.168.XXX:~/mnt/storj2/storagenode-new/identity does not work ‘No such file or directory’ I’m obviously making some simple mistake with the path here but I don’t know what.

---

<div class="post-metadata">

**Author:** ![tiaxthegrand](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/tiaxthegrand/32/7814_2.png) [@tiaxthegrand](https://forum.storj.io/u/tiaxthegrand)\
**Post date:** [April 9, 2023, 1:06pm UTC](https://forum.storj.io/t/trying-to-migrate-node-from-a-server-to-a-raspberry-pi-4-8gb-struggling-with-rsync/22228/6 "2023-04-09T13:06:37Z")

</div>

> Why don’t you connect the usb harddrive to the server and transfer it directly over usb then connect it to your rpi when done.  
> This should be a lot faster than trying to transfer it over network.

If there was documentation explaining that, then I would, but I’m not familiar enough with Linux, Storj, or any part of this to diverge from the documentation. I would not be able to get it to work. Waiting for a sync also just isn’t much of a problem for me, but losing the 4.5tb node would be pretty annoying.

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [April 9, 2023, 1:16pm UTC](https://forum.storj.io/t/trying-to-migrate-node-from-a-server-to-a-raspberry-pi-4-8gb-struggling-with-rsync/22228/7 "2023-04-09T13:16:05Z")

</div>

> [@tiaxthegrand](#):
>
> But I cannot figure out what needs to be the path for the destination.

I suggest to create an identity folder on your data location, i.e. `/mnt/storj2/storagenode1/identity` with the command on the raspi

```auto
mkdir -p /mnt/storj2/storagenode1/identity

```

and copy your identity to there. Later you will use it in your `docker run` command.

> [@tiaxthegrand](#):
>
> user@192.168.XXX:~/mnt/storj2/storagenode-new/identity does not work ‘No such file or directory’

You usually need to create this directory on a destination, like this:

```auto
mkdir -p /mnt/storj2/storagenode-new/identity

```

However, make sure that your drive is actually mounted to `/mnt/storj2` or `/mnt/storj2/storagenode-new`

---

<div class="post-metadata">

**Author:** ![tiaxthegrand](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/tiaxthegrand/32/7814_2.png) [@tiaxthegrand](https://forum.storj.io/u/tiaxthegrand)\
**Post date:** [April 9, 2023, 2:08pm UTC](https://forum.storj.io/t/trying-to-migrate-node-from-a-server-to-a-raspberry-pi-4-8gb-struggling-with-rsync/22228/8 "2023-04-09T14:08:54Z")

</div>

> However, make sure that your drive is actually mounted to `/mnt/storj2` or `/mnt/storj2/storagenode-new`

lsblk  
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT  
sda 8:0 0 5.5T 0 disk  
├─sda1 8:1 0 1007K 0 part  
└─sda2 8:2 0 5.5T 0 part /mnt/storj2  
mmcblk0 179:0 0 14.5G 0 disk  
├─mmcblk0p1 179:1 0 256M 0 part /boot  
└─mmcblk0p2 179:2 0 14.2G 0 part /

> You usually need to create this directory on a destination, like this:  
> `mkdir -p /mnt/storj2/storagenode-new/identity`

I tried that, it seemed to successfully create the directory but when I tried rsync it still said no such directory.

---

<div class="post-metadata">

**Author:** ![donald.m.motsinger](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/donald.m.motsinger/32/71_2.png) [@donald.m.motsinger](https://forum.storj.io/u/donald.m.motsinger)\
**Post date:** [April 9, 2023, 4:02pm UTC](https://forum.storj.io/t/trying-to-migrate-node-from-a-server-to-a-raspberry-pi-4-8gb-struggling-with-rsync/22228/9 "2023-04-09T16:02:04Z")

</div>

> [@tiaxthegrand](#):
>
> user@192.168.XXX:~/mnt/storj2/storagenode-new/identity

Ommit the ~ as this gets substituted by the user’s home directory /home/user. So the path would be /home/user/mnt/storj2/storagenode-new/identity in your example, which does not exist. What you want ist the right absolute path /mnt/storj2/storagenode-new/identity. Make sure that the user can write into that folder.

---

<div class="post-metadata">

**Author:** ![nyancodex](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/nyancodex/32/1129_2.png) [@nyancodex](https://forum.storj.io/u/nyancodex)\
**Post date:** [April 9, 2023, 4:28pm UTC](https://forum.storj.io/t/trying-to-migrate-node-from-a-server-to-a-raspberry-pi-4-8gb-struggling-with-rsync/22228/10 "2023-04-09T16:28:13Z")

</div>

> [@tiaxthegrand](#):
>
> But I cannot figure out what needs to be the path for the destination. user@192.168.XXX:~/mnt/storj2/storagenode-new/identity does not work ‘No such file or directory’ I’m obviously making some simple mistake with the path here but I don’t know what.

the “~” character means the home directory of current logged in user, for example if you using the root user it will be “/root/”, if you using user “alan” then it’s “/home/alan/”.

you need to remove the “~” character and use an absolute path.

---

<div class="post-metadata">

**Author:** ![tiaxthegrand](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/tiaxthegrand/32/7814_2.png) [@tiaxthegrand](https://forum.storj.io/u/tiaxthegrand)\
**Post date:** [April 9, 2023, 5:47pm UTC](https://forum.storj.io/t/trying-to-migrate-node-from-a-server-to-a-raspberry-pi-4-8gb-struggling-with-rsync/22228/11 "2023-04-09T17:47:59Z")

</div>

> Ommit the ~ as this gets substituted by the user’s home directory /home/user.

> you need to remove the “~” character and use an absolute path.

That worked! Sort of. It now seems to be making the attempt correctly, but still failed because ‘Permission denied’. The command I am using is ‘sudo rsync -aP ~/.local/share/storj/identity/storagenode/\* user@192.168.xxx:/mnt/storj2/storagenode-new/identity/’

When I run that command it asks for sudo password for the machine I’m ssh’d into and then asks for password for the pi. When I enter the passwords it then shows some lines with download rates, all with times of 0:00:00, and tells me they all failed on the reciever side because permission denied.

---

<div class="post-metadata">

**Author:** ![donald.m.motsinger](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/donald.m.motsinger/32/71_2.png) [@donald.m.motsinger](https://forum.storj.io/u/donald.m.motsinger)\
**Post date:** [April 9, 2023, 8:32pm UTC](https://forum.storj.io/t/trying-to-migrate-node-from-a-server-to-a-raspberry-pi-4-8gb-struggling-with-rsync/22228/12 "2023-04-09T20:32:57Z")

</div>

> [@tiaxthegrand](#):
>
> When I run that command it asks for sudo password for the machine I’m ssh’d into and then asks for password for the pi. When I enter the passwords it then shows some lines with download rates, all with times of 0:00:00, and tells me they all failed on the reciever side because permission denied.

The user “user” needs write permissions on the folder /mnt/storj2/storagenode-new/identity/.

---

<div class="post-metadata">

**Author:** ![tiaxthegrand](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/tiaxthegrand/32/7814_2.png) [@tiaxthegrand](https://forum.storj.io/u/tiaxthegrand)\
**Post date:** [April 12, 2023, 12:09am UTC](https://forum.storj.io/t/trying-to-migrate-node-from-a-server-to-a-raspberry-pi-4-8gb-struggling-with-rsync/22228/13 "2023-04-12T00:09:36Z")

</div>

Success! I also created the /mnt/storj2/storagenode-new/orders/ directory and /mnt/storj2/storagenode-new/storage/ directory and given user permissions, but I can’t figure out where the actual orders and data are on the original machine. Can I get some help finding those?

---

<div class="post-metadata">

**Author:** ![nyancodex](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/nyancodex/32/1129_2.png) [@nyancodex](https://forum.storj.io/u/nyancodex)\
**Post date:** [April 12, 2023, 1:36am UTC](https://forum.storj.io/t/trying-to-migrate-node-from-a-server-to-a-raspberry-pi-4-8gb-struggling-with-rsync/22228/14 "2023-04-12T01:36:38Z")

</div>

you need to check your config.yaml file for this

---

<div class="post-metadata">

**Author:** ![tiaxthegrand](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/tiaxthegrand/32/7814_2.png) [@tiaxthegrand](https://forum.storj.io/u/tiaxthegrand)\
**Post date:** [April 16, 2023, 2:22pm UTC](https://forum.storj.io/t/trying-to-migrate-node-from-a-server-to-a-raspberry-pi-4-8gb-struggling-with-rsync/22228/15 "2023-04-16T14:22:55Z")

</div>

From what I’m reading, the config.yaml file is in the same directory that I can’t find though. This feels impossibly complicated.

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [April 17, 2023, 4:18am UTC](https://forum.storj.io/t/trying-to-migrate-node-from-a-server-to-a-raspberry-pi-4-8gb-struggling-with-rsync/22228/16 "2023-04-17T04:18:29Z")

</div>

Please show your current `docker run` command (you may mask the private info).  
Or you may execute this command on the source server:

> [@Database disk image malformed after a crash](https://forum.storj.io/t/database-disk-image-malformed-after-a-crash/5708/16):
>
> could you please, show the result of the command: docker inspect storagenode -f '{{.Mounts}}'

and post result here.

---

<div class="post-metadata">

**Author:** ![tiaxthegrand](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/tiaxthegrand/32/7814_2.png) [@tiaxthegrand](https://forum.storj.io/u/tiaxthegrand)\
**Post date:** [April 17, 2023, 11:24pm UTC](https://forum.storj.io/t/trying-to-migrate-node-from-a-server-to-a-raspberry-pi-4-8gb-struggling-with-rsync/22228/17 "2023-04-17T23:24:27Z")

</div>

I already generated a new identity for a new node. I’ve put over a week into trying to figure this out and I’m still not there, it’s not worth struggling anymore.

If I follow the installation directions for raspberry pi exactly, am I going to end up losing the identity and node in a year when the sd card fails?

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [April 18, 2023, 3:34am UTC](https://forum.storj.io/t/trying-to-migrate-node-from-a-server-to-a-raspberry-pi-4-8gb-struggling-with-rsync/22228/18 "2023-04-18T03:34:52Z")

</div>

If you place your identity to the disk with data instead of SD card, it should survive.  
In the worst case you would need to re-flash the SD card, install docker and run your node back.  
Please never run the setup step again for the existing worked node and it should be ok.
