LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-06-2020, 06:05 PM   #1
marietto
Member
 
Registered: Aug 2010
Posts: 96

Rep: Reputation: 17
how to copy all files from ubuntu A to ubuntu B,preserving everything,permissions and simlinks.


Hello to everyone.

I would like to copy all files of this kind : *vmware* with the same permissions and simlinks whatever they are on the ubuntu distribution that I have installed on the PC A to a usb stick and from the usb stick to the ubuntu distribution that I have installed on the PC B. Can someone give me some help ? I tried to do something like this,but it didn't work :

Quote:
root@ziomario-I9:/media/ziomario/ACRONIS_MED/vmware/etc/rc2.d# rsync -avz /etc/rc2.d/*vmware* /media/ziomario/ACRONIS_MED/vmware/etc/rc2.d/

sending incremental file list

rsync: symlink "/media/ziomario/ACRONIS_MED/vmware/etc/rc2.d/.K08vmware-USBArbitrator.7003" -> "/etc/init.d/vmware-USBArbitrator" failed: Operation not permitted (1)
rsync: symlink "/media/ziomario/ACRONIS_MED/vmware/etc/rc2.d/.S01vmware.7003" -> "../init.d/vmware" failed: Operation not permitted (1)
rsync: symlink "/media/ziomario/ACRONIS_MED/vmware/etc/rc2.d/.S01vmware-workstation-server.7003" -> "../init.d/vmware-workstation-server" failed: Operation not permitted (1)
rsync: symlink "/media/ziomario/ACRONIS_MED/vmware/etc/rc2.d/.S50vmware-USBArbitrator.7003" -> "/etc/init.d/vmware-USBArbitrator" failed: Operation not permitted (1)

sent 276 bytes received 670 bytes 1,892.00 bytes/sec
total size is 115 speedup is 0.12
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]
thanks.

Last edited by marietto; 06-06-2020 at 06:09 PM.
 
Old 06-06-2020, 06:53 PM   #2
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 797

Rep: Reputation: 184Reputation: 184
what are the directory and file permissions?
 
Old 06-07-2020, 05:47 AM   #3
marietto
Member
 
Registered: Aug 2010
Posts: 96

Original Poster
Rep: Reputation: 17
formatting the usb stick with ext4 fixed the problem.
 
Old 06-07-2020, 01:46 PM   #4
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,937

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
On a related issue...
I use rsync (running as root) to transfer a directory of backup files in a ext4 file system to an external disk (ext3 file system).
This contains a couple of symlinks - which always fail to transfer.

Code:
rsync -avl --delete --progress --human-readable --stats --numeric-ids  /mnt/backup/     /media/NAS/backup/
Code:
rsync: failed to set times on "/media/NAS/backup/sbackup/all.1.new.gz": Stale file handle (116)
rsync: failed to set times on "/media/NAS/backup/sbackup/all.2.new.gz": Stale file handle (116)
...
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]

Last edited by JeremyBoden; 06-07-2020 at 07:01 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Grep all files recursively in directory, and if file contains two patterns on the same line, bzip2 it while preserving directory structure onthetopo Linux - Newbie 15 05-09-2017 10:54 AM
Removing graphics from a PDF, preserving everything else NeilNjae Linux - Software 2 07-29-2013 11:00 AM
copy files with preserving the attributes goldeneye075 Linux - Newbie 7 06-04-2010 09:35 AM
ISOFS simlinks followable in Windows? dengel Linux - General 3 02-01-2007 12:55 PM
rc simlinks keep returning Shade00 Linux - Newbie 3 05-12-2004 10:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:32 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