LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 01-11-2024, 12:57 PM   #46
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5

Thanks, read. X E.
 
Old 01-11-2024, 12:59 PM   #47
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
I think I prefer on main drive, newer stuff should have bug fixes and like and yes, I know how to find it. Thanks. X E.
 
Old 01-11-2024, 01:02 PM   #48
maybeJosiah
Member
 
Registered: Jan 2024
Location: USA
Distribution: Ubuntu, Android, Ubuntu Touch, Jolla Sailfish maybe
Posts: 195

Original Poster
Blog Entries: 2

Rep: Reputation: 5
Like my main concern about using rsync is if I overwrite rsync, what happens to that running program with restore. With that reply I assume it would keep running fine. X E.

Last edited by maybeJosiah; 01-11-2024 at 01:02 PM. Reason: rsync not it maybe
 
Old 01-11-2024, 01:28 PM   #49
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
If you type in the command "rsync", the bash shell will search for a command named "rsync" within the current $PATH. You can see the $PATH with this:

Code:
echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
It searches these paths.

This is similar to how things work on, say, MS-DOS, but in Linux this $PATH will basically never include the current directory.

The bottom line is that it will only execute the copy of rsync that's from the currently running OS, and never any other copy of rsync unless you for some (stupid) reason specify otherwise with a full path or relative path to some other copy of rsync.
 
1 members found this post helpful.
Old 01-11-2024, 02:10 PM   #50
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,901

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
Quote:
Originally Posted by maybeJosiah View Post
Like my main concern about using rsync is if I overwrite rsync, what happens to that running program with restore. With that reply I assume it would keep running fine. X E.
In general overwriting a file which is currently in use is not a good idea, that may have strange side effects.
In such cases, the operating system may continue to run the copy in RAM, as long as the system does not attempt to access the original file on disk. This can cause an instant crash (of that app).
 
1 members found this post helpful.
Old 01-11-2024, 02:25 PM   #51
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,808

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
There is no danger with rsync. For example, if you have /usr/bin/rsync on disk and want to restore a different version from backup: rsync copies to file name /usr/bin/rsync.NKnduM (last six characters are random). Only when done copying, it renames it to /usr/bin/rsync. So, it doesn't use the old file's inode but creates a separate one. The running rsync process continues to use the old binary on disk and the old inode is removed from the disk only after the last user stops using it.
 
1 members found this post helpful.
Old 01-12-2024, 05:54 AM   #52
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,808

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
Quote:
Originally Posted by Petri Kaukasoina View Post
The only real difference between -vrlDAXHxog and -vaxHAX is that the latter preserves mtime. But for some reason you want to set it yourself.
By the way. If you use 'rsync -av' (mtime preserved) and you interrupt copying, another 'rsync -av' continues from that. Or if you change some files and run 'rsync -av' again, it will only transfer the new changed files.

But your command 'rsync -vrlDAXHxog' (mtime not preserved) will always start from the beginning and copy everything again after an interrupt.

Quote:
Rsync finds files that need to be transferred using a "quick check" algorithm (by default) that looks for files that have changed in size or in last-modified time.

Last edited by Petri Kaukasoina; 01-12-2024 at 05:56 AM.
 
Old 01-12-2024, 03:49 PM   #53
rclark
Member
 
Registered: Jul 2008
Location: Montana USA
Distribution: KUbuntu, Fedora (KDE), PI OS
Posts: 485

Rep: Reputation: 180Reputation: 180
Quote:
... if you change some files and run 'rsync -av' again, it will only transfer the new changed files.
That is why I like 'rsync -av --delete' as it only transfers/deletes files that have changed. Subsequent backups are a lot quicker than the first one to keep everything in sync.
 
  


Reply

Tags
backup, command line, restore, rsync, usb



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
media, ex: floppy disk, HDD short life span, forget how to use; preservation rico001 Linux - General 1 05-29-2021 03:17 PM
Making mirrow using mkraid with preservation information on one of the disks. Shakin_Aleksey Linux - Server 1 07-24-2011 10:21 PM
Searching for an appropriate Interprocess communication with data preservation Esika Programming 2 06-06-2011 05:07 AM
Debian / Ubuntu : Config File Preservation and Merging? tinyTux Debian 2 03-22-2011 11:19 AM
AIX 4.3.3 Preservation Install ajoshay9 Linux - Software 0 12-01-2003 11:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

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