LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 12-25-2023, 12:23 AM   #1
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Rep: Reputation: 8
Can not RSYNC files from native NAS volume to mayQNAPcloud Storage


I would like to backup MariaDB in a container to myQNAPcloud Storage using RSYNC.
QNAP cloud resource mounted with QNAP HybridMount app.
I do this from the container using the command below. $path - a variable containing the path to the mounted resource from myQNAPcloud storage.

Code:
rsync -ratxvO --force --delete -e '/usr/bin/ssh -p668 -x -q -i /root/.ssh/id_rsa' /backup admin@media:$path
RSYNC cannot change the modification time settings of directories and files in the mounted cloud resource.
So I added the "O" option, which bypasses the time modification. However, something is still wrong. The directory structure is created but no files are transferred.
The message is that RSYNC cannot change the temporary name of the transmitted file (starting with a dot) to the target name. I would use RCLONE, which I use for backups to Google or M$ drives, and the problem would be solved.
But there is no QNAP drive in the RCLONE menu. So what should the RSYNC command look like to perform the above-mentioned backup?
At the moment, the disk mounted in this way certainly does not allow changing the modification time and has some problem with files whose names start with a dot.
Similarly, "normal" copying has problems with modification time:

Code:
cp -a nc-data /share/external/.cm/0/1344d097f-4b77-483b-8d2f-34bcf4228353/
cp: preserving times for `/share/external/.cm/0/1344d097f-4b77-483b-8d2f-34bcf4228353/nc-data/data/maciek/files/Dokumenty/FIRMA/2016/2-luty/Dokumenty': Is a directory
cp: preserving times for `/share/external/.cm/0/1344d097f-4b77-483b-8d2f-34bcf4228353/nc-data/data/maciek/files/Dokumenty/FIRMA/2016/2-luty/Faktury': Is a directory
However, cp is not a good solution for larger numbers of files, only some of which are different in reality of rather slow speed access to cloud resources.
Someone knows how to solve this problem?
 
Old 12-25-2023, 07:52 AM   #2
lvm_
Member
 
Registered: Jul 2020
Posts: 942

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
Quote:
Originally Posted by mackowiakp View Post
The message is that RSYNC cannot change the temporary name of the transmitted file (starting with a dot) to the target name.
Try running it with --inplace option.
 
Old 12-26-2023, 01:53 AM   #3
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Original Poster
Rep: Reputation: 8
I try:

Code:
rsync -ratxvO --inplace --force --delete /share/Container/nc-data /share/external/.cm/0/1344d097f-4b77-483b-8d2f-34bcf4228353/
It synced several filesf/dirs but suddenly error and syncing stoped:

Code:
rsync: write failed on "/share/external/.cm/0/1344d097f-4b77-483b-8d2f-34bcf4228353/nc-data/config/.cache/ffmpeg-static-nodejs/d8e99a1ec077199ee27a98834289213261aa5bb0dfd73d566df7bb0c2f2df6eb02d4f5d7a2e9954111bb296ce199c489d2bd58d47933df0410485416b2d0f768.json": Timer expired (62)
So better but still not good...

Maybe problem is filesize but it is not huge:

Code:
[/share/homes/media/Pobrane/Moje] # ls -la /share/external/.cm/0/1344d097f-4b77-483b-8d2f-34bcf4228353/nc-data/config/.cache/ffmpeg-static-nodejs/7282f931472805b88df890264a2e7b0f35223d7f6fcf43e54dcdc172e5cd21d1b61e4ffa8531bb3d3a3db02b75808d76c3f54fb97a9ed879edaa4efe5da75d09.body
-rw-r--r-- 1 911 911 28099886 2023-12-26 08:47 /share/external/.cm/0/1344d097f-4b77-483b-8d2f-34bcf4228353/nc-data/config/.cache/ffmpeg-static-nodejs/7282f931472805b88df890264a2e7b0f35223d7f6fcf43e54dcdc172e5cd21d1b61e4ffa8531bb3d3a3db02b75808d76c3f54fb97a9ed879edaa4efe5da75d09.body
EDIT
Filesize is not a problem:

Code:
rsync: write failed on "/share/external/.cm/0/1344d097f-4b77-483b-8d2f-34bcf4228353/nc-data/config/keys/cert.crt": Timer expired (62)
rsync error: error in file IO (code 11) at receiver.c(376) [receiver=3.1.2]
[/share/homes/media/Pobrane/Moje] # ls -la /share/external/.cm/0/1344d097f-4b77-483b-8d2f-34bcf4228353/nc-data/config/keys/cert.crt
-rw-r--r-- 1 911 911 1342 2023-12-26 08:36 /share/external/.cm/0/1344d097f-4b77-483b-8d2f-34bcf4228353/nc-data/config/keys/cert.crt
Adding "--timeout=200" does not resolve the problem

Last edited by mackowiakp; 12-26-2023 at 02:24 AM.
 
Old 12-26-2023, 02:42 AM   #4
lvm_
Member
 
Registered: Jul 2020
Posts: 942

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
rsync doesn't retry on errors. If you have a shitty connection or a shitty cloud or whatever, put it in a loop until it returns 0.
 
Old 12-26-2023, 02:55 AM   #5
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Original Poster
Rep: Reputation: 8
I dont think so because I sync to GDrive or OneCloud without problems. So it looks like some timers settings

And additional errors:

Code:
rsync: failed to set times on "/share/external/.cm/0/1344d097f-4b77-483b-8d2f-34bcf4228353/nc-data/config/www/nextcloud/apps/privacy/lib/Settings/UserDataManifestoSettings.php": No such file or directory (2)

Last edited by mackowiakp; 12-26-2023 at 02:56 AM.
 
Old 12-26-2023, 03:51 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,927

Rep: Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320
are these files in use on the remote site?
 
Old 12-26-2023, 04:01 AM   #7
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Original Poster
Rep: Reputation: 8
Yes
 
Old 12-27-2023, 05:05 AM   #8
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Original Poster
Rep: Reputation: 8
Using RCLONE instead RSYNC resolved the problem.
 
  


Reply

Tags
cloud storage, rsync



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
confused over terminology of internal storage and SD card storage - howto encrypt the 128GB of internal storage lgtrean Linux - Mobile 3 12-27-2021 01:27 AM
confused over terminology of internal storage and SD card storage - howto encrypt the 128GB of internal storage (2nd try) lgtrean Linux - Mobile 1 12-24-2021 12:45 PM
LVM Mount Physical Volume/Logical Volume without a working Volume Group mpivintis Linux - Newbie 10 01-11-2014 07:02 AM
Buffalo NAS - how do we get files on NAS syncing with Windows Sync? bykerbob Linux - Newbie 0 10-21-2008 08:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 02:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration