Oh I should not that my examples do NOT include -H, which preserves hard links. I perhaps should start including it. Something like this:
Code:
rsync -vaxHAX --delete --progress --exclude home/kuo/.cache /mnt/sda1/* /mnt/sdc1/ Obviously, it can also be a disk space issue. But for my usage, this is not really a problem. The only place where I use hard links is in multiple snapshot type backups. |
I am not trying for efficiency or size reduction, I just try for a full copy. I am starting to think "tar" might be a good idea but I like raw form for efficiency. Yes I have read about sparse files with rsync. I do not know what it would be used for with this though. X E.
|
IsaacKuo, how can I preserve symbolic links or create them again. I seem to need them. Storage space is no object. I have a 2.1TB USB stick. X E.
|
Looks like I can use "ln -s" for this so I can write this to a file and restore symbolic links from that. X E.
|
sudo rsync -vrlDAXpHtUExog --progress --delete --open-noatime --exclude='(USB at)' (like '/' but not) (copy to directory)
sudo rsync -vaxHAX --delete --progress --exclude home/kuo/.cache /mnt/sda1/* /mnt/sdc1/ Looks like missing "EUtp" so that is what I should store as a file. I just realized "l" is in "a" so symbolic links are preserved. That means executability, permissions, and I think rest are timestamps which I already record. Forgot what "t" was. Also, I like that --open-noatime so I preserve original access times. X E. |
To explain that last post, that was for comparing and finding what I should record with "that means". Sorry I was confusing. X E.
|
Quote:
maybe I would try the tool rsnapshot. |
Just looked up again and yes, all I need to record extra is permissions and executability. I already have all timestamps. With that I think this is what to use.
Quote:
|
This seems solved now but to be sure, is that last command I posted safe? I understand no one tool does all currently but with rsync and some code I think I can do a full backup. Am I correct in that? Also, I seem to be prefering raw paths while IsaacKuo is using /dev/... so why would I use that? I am trying for full as system was restorable. This includes what I delete stays deleted. X E.
|
Permissions seems complex to get and set. First 10 characters of "ls -l" are permissions but I do not know how to re-encode it for "chmod" Can I include "p" or should I try to re-encode? X E.
|
https://zzzcode.ai/answer-question?i...8-d98fb17da0c3
I just realized there is an easy way with "stat" and "chmod". Problem of permissions solved. Now just if like my previous to use command is safe. X E. |
Quote:
As to whether or not the replicated symlink works ... that depends on stuff later on, and may depend on whether the symlink is relative or absolute. Either way, the "l" or "a" options will replicate all symlinks exactly as is - even broken ones. |
Sorry I did not understand that "l" was in "a" before. X E.
|
Quote:
|
Oops, it was /mnt/... not as I said, sorry. X E.
|
All times are GMT -5. The time now is 08:41 PM. |