Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] rsync not deleting removed directory and drive PW DIS 3.3v question
Date: Tue, 06 Sep 2022 01:59:13
Message-Id: 18f379ee-4d94-9537-8c76-0ce93fba89a2@gmail.com
In Reply to: Re: [gentoo-user] rsync not deleting removed directory and drive PW DIS 3.3v question by Frank Steinmetzger
1 Frank Steinmetzger wrote:
2 > Am Fri, Sep 02, 2022 at 03:35:56AM -0500 schrieb Dale:
3 >
4 >> time rsync -auv --progress --delete /home/dale/Desktop/Crypt/Video/*
5 >> /mnt/10tb/Video/
6 > A little OT, but still related:
7 > Instead of -v, give -i a try. -v only shows you the path of synced files. In
8 > addition to that, -i also shows you *why* a file is synced and what exactly is
9 > synced (the whole file, or only permissions or timestamps or other attributes).
10 >
11 >
12 > An example:
13 >
14 > ## create source and destination dir, and a source file
15 > $ mkdir a b
16 > $ touch a/foo
17 >
18 > ## rsync the -v way
19 > $ rsync -av a/ b/
20 > sending incremental file list
21 > ./
22 > foo
23 >
24 >
25 > ## update timestamp of first file, create another file, and rsync with -i
26 > $ touch a/{foo,bar}
27 >
28 > $ rsync -ai a/ b/
29 > .d..t...... ./
30 >> f+++++++++ bar
31 >> f..t...... foo
32 > See what it did there? Rsync tells you that it copied the new file "bar",
33 > but "foo" only had its timestamp changed, the same as for the root dir,
34 > because we added a file to it.
35 >
36 >
37
38 While it may be a tiny bit off topic, not that I mind, it is certainly
39 interesting.  I added the i to the commands to see what info it
40 included.  Then I googled for more details on what things meant.  It
41 shows a d for directory, t for time stamp change etc etc.  While I
42 rarely use dry-run, it is still neat to see why it is doing something. 
43 It doesn't take up much room but does provide lots of info.  So, while
44 it may be of more use if I were using dry-run, I'm still adding it. 
45
46 I might add, I got all my so called scripts updated and it is deleting
47 removed stuff like I expect.  It also hit me why it would add but not
48 delete.  It would add because there were files inside those
49 directories.  It had to create one to update the other.  However, if I
50 removed the directory, well, it wasn't exactly looking since my method
51 was telling it not too.  ;-)
52
53 For anyone running up on this, the same logic of trailing / or * will
54 likely apply to cp or scp as well. 
55
56 I also had a brain storm about my new 14TB drive.  I'm going to make it
57 my backup drive in place of the 10TB which is almost full already.  I'll
58 replace a 8TB with the 10TB, which is well tested by now, and it will
59 add more space.  Later on, maybe another 14TB and remove a 8TB or
60 something.  As I'm doing this, I'm building up a stock pile of spare
61 drives, either in the event of a failure or building a nifty new
62 machine.  o_O 
63
64 I just wish I had a better way of tracking passwords for encrypted
65 drives.  I have a different one for each drive with similar methodology
66 but no one else would likely guess what they are.  Plus, they are very
67 secure according to several password checker websites.  Still, good
68 passwords tend to also be hard to remember.  The more passwords one has,
69 the harder it gets.  Having a tool sort of defeats the purpose so not
70 sure of a better way. 
71
72 Thanks to all.  Backups are looking great, I just have to do them more
73 often with this faster internet.  ;-)
74
75 Dale
76
77 :-)  :-)