I use sudo only one one side:
sudo rsync -aP usr@192.168.1.15:/home/usr/storj_data/ /home/usr/storj/
I use sudo only one one side:
sudo rsync -aP usr@192.168.1.15:/home/usr/storj_data/ /home/usr/storj/
edit: oh wait, you use sudo on the receiving side but copy using usr on the sending side. that can cause problems if all your files are owned by root on the sending side.
I was thinking why some files are success and some NOT. And realised, that source (sending side) already had one migration few months ago. That’s probably why some files are readable and some files are not readable by “usr”.
But the question then is how should i solve this? Maybe i need to log on to remote (sending) machine and change permissions of the files.
sudo chown usr:usr /home/usr/storj_data ???
it depends on how your node is started. is your docker container running as root? then every new piece it receives will be root again and you wouldn’t win much. In that case syncing from the sending machine to the new machine might be easier.
I run my docker container as my normal user so I did:
chown -R usr:usr /home/usr/storj_data
I’ve added docker to the sudo group, so i run docker commands without sudo.
sudo usermod -aG docker $USER
But maybe you are righ, i will try to run rsync from source side…
that is a completely different topic.
So if you don’t know, you’re definitely still running the container as root. Otherwise you woud have this in your run command: --user 1000 (or similar).
Then I’d suggest syncing from the sending server instead of the receiving one. Then you send as root and receveice as usr
Ok… the problem - i can’t start rsync from “sending” side, as i have one way vpn connection…
Then again i think maybe i should use this command on sending side to change permissions? But the node is online and running. Is it safe to run this command? It will not damage anything?
sudo chown -R usr:usr /home/usr/storj_data
well when the docker container runs as root then it can read the files if they belong to usr but any new file the container creates will be root again and you might not be able to read those and get permission errors again.
a different (arguably less safe) method would be to give the root user on the receving side a strong password, allow ssh access for root and then rsync as root@receiver.
Maybe there are other options I can’t think of right now.
Ok… you right…
Probably i will try change permission, so i could get as much as possible files over vpn. Once the drive will be at the same location i have to make last sync any ways…
Thank you.