Hello Shachar,
hereby a scenario to reproduce many times. I've created a set-up where
you can reproduce numerous time, very quickly.
In scenario, I have a huge number of files in a directory, when
rsyncrypto is running, I suspend with Ctrl-Z, delete all files in the
directory, then continue unsuspending rsyncrypto by bringing to the
foreground with 'fg' command.
To be able to reproduce time-after-time, I'm keeping a copy of the
original big directory in repo-source-dir-copy
Set-up of environment in a test-directory:
mkdir repo-source-dir
mkdir repo-encrypted-dir
mkdir SRCDIR.KEYS
dd bs=4k count=2 if=/dev/urandom of=./repo-source-dir-copy/orig-file
let a=1
cd repo-source-dir-copy
while true; do cp orig-file copy-file-$a; let a=a+1; echo $a; done
# interrupt when sufficient files created, like 600-700
#
cd ..
dd bs=4k count=2 if=/dev/urandom of=./repo-source-dir/orig-file2
dd bs=4k count=2 if=/dev/urandom of=./repo-source-dir/orig-file3
./rsyncrypto -vvr --changed --trim=0 \
--name-encrypt=./repo-encrypt-filename --ne-nesting=3 \
./repo-source-dir \
./repo-encrypted-dir \
./SRCDIR.KEYS \
./rckey.crt
#
# now 2 files in repo-encrypt-filename
#
# strings repo-encrypt-filename
# /73B2387C10C76099CDADBC8BE8EB908B ./repo-source-dir/orig-file3
# /B06C02944DC76FCC72B038EEB0FCA02E ./repo-source-dir/orig-file2
=============
Then to reproduce the problem:
#
# add many files to repo-source-dir
#
ln ./repo-source-dir-copy/* ./repo-source-dir
#
# execute new backup
#
./rsyncrypto -vvr --changed --trim=0 \
--name-encrypt=./repo-encrypt-filename --ne-nesting=3 \
./repo-source-dir \
./repo-encrypted-dir \
./SRCDIR.KEYS \
./rckey.crt
#
# suspend when running by ctrl-Z
#
# Encrypting ./repo-source-dir/copy-file-753
# Encrypting ./repo-source-dir/copy-file-629
# ^Z
# [1]+ Stopped ./rsyncrypto -vvr --changed --trim=0
--name-encrypt=./repo-encrypt-filename --ne-nesting=3 ./repo-source-dir
./repo-encrypted-dir ./SRCDIR.KEYS ./rckey.crt
#
rm repo-source-dir/*
#
# bring back to foreground
#
# fg
#
# lstat failed(./repo-source-dir/copy-file-12): No such file or directory
# lstat failed(./repo-source-dir/copy-file-178): No such file or directory
# lstat failed(./repo-source-dir/copy-file-296): No such file or directory
# lstat failed(./repo-source-dir/copy-file-70): No such file or directory
# lstat failed(./repo-source-dir/copy-file-456): No such file or directory
# lstat failed(./repo-source-dir/copy-file-580): No such file or directory
# lstat failed(./repo-source-dir/copy-file-606): No such file or directory
# Exit code delayed from previous errors
#
# check number of filename in repo-encrypt-filename
#
# strings repo-encrypt-filename
# /73B2387C10C76099CDADBC8BE8EB908B ./repo-source-dir/orig-file3
# /B06C02944DC76FCC72B038EEB0FCA02E ./repo-source-dir/orig-file2
#
==============================
If you need to test again, start over at 'ln' command
regards,
Johan
On 05/10/18 20:48, Shachar Shemesh wrote:
On 16/09/18 17:36, sourcefo...@compunix.com wrote:
Dear,
I' running rsyncrypto with option --name-encrypt=translation_file to
encrypt filenames. The file translation_file is in most caes updated
at the end of the run.
Currently, the translation_file is not updated at the end of the run.
There is an error message on 'lstat failed(/dir/dir/filename): No
such file or directory'
The error is caused by the fact that between rsyncrypto reading the
directory and then attempting to access the file, the file has been
deleted.
So I end up with many encrypted files, but no updated
translation_file. How can it be forced that translation_file is
written out, even in the case of a lstat error ?
regards,
Johan
Hello Johan,
I'm trying to wrap my brains about the sequence of events. Can you
give me reproduction instructions to this problem? What steps do I
need to take in order to see it on my system?
Thanks,
Shachar
_______________________________________________
Rsyncrypto-devel mailing list
Rsyncrypto-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsyncrypto-devel
_______________________________________________
Rsyncrypto-devel mailing list
Rsyncrypto-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsyncrypto-devel