diff options
| author | Xiao Pan <xyz@flylightning.xyz> | 2026-11-17 01:14:15 +0800 |
|---|---|---|
| committer | Xiao Pan <xyz@flylightning.xyz> | 2026-11-17 01:14:15 +0800 |
| commit | 6a9b831035be8c09f01d2f2c52a27300bff045ba (patch) | |
| tree | 45b9fc4781e23d6315dc0a924044a004faac494f /sh | |
| parent | edd02cff201fcb43deb56f2d8daa09a44f0489ea (diff) | |
rsync -vPu after ctrl-c then run it again it will not resume due to
modification time is newer on destination file than source file. I find
out that -t flag can fix it. With rsync -vPut, before transfer done the
destination file mod time is 1980-1-1 so ctrl-c then run it again it
will resume, after transfter done the file is ib iso's mod time so when
run it again it will not run, this behavior see `man rsync` "--update,
-u" section, this behaviro is what I want to achieve with -u.
When running the cli, there should be one old iso file, the newly
transferred file seems is another .archlinux-x86_64.iso.mcWpvK file. If
I ctrl-c, it seems will `mv .archlinux-x86_64.iso.mcWpvK
archlinux-x86_64.iso` so there will only exist one iso file which
contain newly transferred data. Before this fix, I need to run things
like `touch -d 2026-9-1 archlinux-x86_64.iso` to make mod time older so
resume work.
Note if drive somehow umount and mount again by itself and rsync stuck
so I have to run ctrl-c, both .archlinux-x86_64.iso.mcWpvK and
archlinux-x86_64.iso will exist after ctrl-c. So doing the following
thing works before this commit:
cp .archlinux-x86_64.iso.mcWpvK archlinux-x86_64.iso
touch -d 2026-9-1 archlinux-x86_64.iso
I guess no need touch cli after this commit which uses -t flag.
Diffstat (limited to 'sh')
| -rwxr-xr-x | sh/upd | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -412,7 +412,7 @@ monthly_misc () { done #[ -d /run/media/xyz/Ventoy ] || die "No usb flash drive" - rsync -vPu ib:downloads/torrents/useful/archlinux*.iso /run/media/xyz/Ventoy/archlinux-x86_64.iso + rsync -vPut ib:downloads/torrents/useful/archlinux*.iso /run/media/xyz/Ventoy/archlinux-x86_64.iso # only check checksum and gpg signature on insp is sufficient for me, else too much work if curl -sS -o /run/media/xyz/Ventoy/archlinux-x86_64.iso.sig https://mirror.fcix.net/archlinux/iso/latest/archlinux-x86_64.iso.sig; then gpg --verify /run/media/xyz/Ventoy/archlinux-x86_64.iso.sig || die 'Arch iso gpg signature check failed' |
