LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 08-24-2020, 05:23 PM   #16
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550

Quote:
Originally Posted by alex4buba View Post
My final question, is my rsync command the correct one, or should I have -rR instead
The rsync switches I've been using are:
Code:
--archive --itemize-changes --one-file-system --perms --owner --group --recursive
Works like s charm for me. (You might not need/want "--itemize-changes" ... I generate a log file that's emailed to me containing that information.

HTH...
 
Old 08-24-2020, 05:38 PM   #17
alex4buba
Member
 
Registered: Jul 2020
Posts: 620

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rnturn View Post
The rsync switches I've been using are:
Code:
--archive --itemize-changes --one-file-system --perms --owner --group --recursive
Works like s charm for me. (You might not need/want "--itemize-changes" ... I generate a log file that's emailed to me containing that information.

HTH...
I am new to all this, can you please answer my question, I am confused enough without extra options.
I am now using this : rsync -aR /home/alex/alexfolders /media/alex/New-SD-512/sun/

To do a recursive backup, into the same target folder - are my 2 arguments the best option?

Thanks
Alex
 
Old 08-24-2020, 05:49 PM   #18
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
I think what you want is -r, not -R. Different utilities have different options, and rsync uses both -r and -R. The lowercase -r means recurse into subdirectories. Uppercase -R means use relative path names. You can see all the options by running
Code:
rsync --help
I also advise using the -a option, as -ar. Do not use -a -r syntax, just one dash - and the options together, as you are doing. All this is package specific. Every one has its own syntax and meaning, so you always have to either read the manual or at least run --help for every one of them. Each package has its own developer and maintainer, it's not like Microsoft which employs tens of thousands of coders to do it all one way. Linux developers are unpaid for the most part, and do it for the enjoyment of helping others. So some quirks must be overlooked. After all, it's free, and you get more than you pay for.

Last edited by sgosnell; 08-24-2020 at 05:53 PM.
 
Old 08-24-2020, 06:46 PM   #19
alex4buba
Member
 
Registered: Jul 2020
Posts: 620

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sgosnell View Post
I think what you want is -r, not -R. Different utilities have different options, and rsync uses both -r and -R. The lowercase -r means recurse into subdirectories. Uppercase -R means use relative path names. You can see all the options by running
Code:
rsync --help
I also advise using the -a option, as -ar. Do not use -a -r syntax, just one dash - and the options together, as you are doing. All this is package specific. Every one has its own syntax and meaning, so you always have to either read the manual or at least run --help for every one of them. Each package has its own developer and maintainer, it's not like Microsoft which employs tens of thousands of coders to do it all one way. Linux developers are unpaid for the most part, and do it for the enjoyment of helping others. So some quirks must be overlooked. After all, it's free, and you get more than you pay for.
Hello again,

Now, you raised more wondering in my mind. I understand that Ubuntu comes as open source version of Linux. I can also see that some people took that and created new derivatives - kbuntu, xbuntu etc...

But, am I wrong in thinking that rsync is ONE single package, that package will use the same command line arguments in any distro of Ubuntu and its derivatives, or am I wrong?

In the process of moving my dayly backup from the SD card to the external 3TB WD disk, I ran the following command:

Code:
rsync -rv /home/alex/alexfolders /media/alex/Elements/mon/
After some 5 minutes ran, at the end I see:

Code:
sent 16,195,459,977 bytes  received 307,146 bytes  80,376,015.50 bytes/sec
total size is 16,190,478,561  speedup is 1.00
How come the number sent, is so much larger than the number received? I checked the final outcome and it seems the folders / files are all there on the drive.

-R is relative path, what does that mean? Relative to what? Otherwise, what is the path?

Cheers
Alex

Last edited by alex4buba; 08-24-2020 at 06:49 PM.
 
Old 08-24-2020, 07:12 PM   #20
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,728

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
As —help will show, -a includes -r and several other options. And I agree, -R is not necessary

Received bytes are those received back from the destination...probably acks or chechkbits.

man rsync is comprehensive...I’ve had to look up answers for several of your questions...you could read for yourself. If you’re not comfortable using it from the command line...which I get...any man page can usually be found on the web.

Last edited by scasey; 08-24-2020 at 07:15 PM.
 
Old 08-24-2020, 09:32 PM   #21
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
Rsync is the same everywhere. But every application is developed individually, and uses its own conventions. The options in rsync are not the same as in any other package, every one is a little different. There are some conventions, but they're only conventions, and don't have to be followed. That's why you need to read the manual
Code:
man <packagename>
for every one you use before you run it. Or at least try
Code:
packagename --help
That is mostly reliable, but even that doesn't work for every package. '-h' sometimes works for help, but it can easily mean something else entirely. That's something you just have to accept.
 
Old 08-24-2020, 10:39 PM   #22
alex4buba
Member
 
Registered: Jul 2020
Posts: 620

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sgosnell View Post
Rsync is the same everywhere. But every application is developed individually, and uses its own conventions. The options in rsync are not the same as in any other package, every one is a little different. There are some conventions, but they're only conventions, and don't have to be followed. That's why you need to read the manual
Code:
man <packagename>
for every one you use before you run it. Or at least try
Code:
packagename --help
That is mostly reliable, but even that doesn't work for every package. '-h' sometimes works for help, but it can easily mean something else entirely. That's something you just have to accept.
I understad, but my question remains - rsync specific.
Can I assume that rsync syntax is the same for all Ubuntu flavours?

Cheers
Alex
 
Old 08-24-2020, 10:42 PM   #23
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
For Ubuntu, Debian, Fedora, or any other distro. The package is the same everywhere, although there may be changes between versions.
 
Old 08-24-2020, 10:47 PM   #24
alex4buba
Member
 
Registered: Jul 2020
Posts: 620

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sgosnell View Post
For Ubuntu, Debian, Fedora, or any other distro. The package is the same everywhere, although there may be changes between versions.
Ok, it is not a yes/ question

Cheers
Alex
 
Old 08-26-2020, 01:40 AM   #25
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by alex4buba View Post
I am new to all this, can you please answer my question, I am confused enough without extra options.
You say that (or something similar) a lot.
Since you are well capable of writing in English, I must assume you are equally capable of reading it.
I suggest you take your newbie attitude as an inspiration to read a lot of documentation - in the case of rsync, I'm sure the man page will provide well-structured and ample material.
Most of your questions are best answered this way.
 
1 members found this post helpful.
Old 08-26-2020, 03:01 AM   #26
alex4buba
Member
 
Registered: Jul 2020
Posts: 620

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
You say that (or something similar) a lot.
Since you are well capable of writing in English, I must assume you are equally capable of reading it.
I suggest you take your newbie attitude as an inspiration to read a lot of documentation - in the case of rsync, I'm sure the man page will provide well-structured and ample material.
Most of your questions are best answered this way.
Hello again
I looked at your message and was pondering for several minutes, on how to react...

So, I decided to just say
Thank you
 
  


Reply



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
LXer: Three reasons you might want to install PCMANFM - The LXDE File Manager LXer Syndicated Linux News 0 08-18-2011 12:20 PM
pcmanfm file manager InvRa Linux - Software 1 01-14-2011 07:09 PM
problem in pcmanfm software (file manager) sumeet inani Linux - Software 0 09-09-2009 03:01 AM
LXer: PCManFM Review - Yet Another Lightweight GTK File Manager LXer Syndicated Linux News 0 07-07-2009 10:10 AM
installed ubunto twice by mistake now in boot up screen get 2 options for ubunto salpapa Linux - Newbie 8 06-28-2007 05:24 PM

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

All times are GMT -5. The time now is 03:43 AM.

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