How to backup before a release upgrade from Ubuntu 18.04.5 LTS server?

Bo Berglund bo.berglund at gmail.com
Mon Sep 27 20:43:01 UTC 2021


On Mon, 27 Sep 2021 20:58:58 +0100, Ian Bruntlett <ian.bruntlett at gmail.com>
wrote:

>Hi Bo,
>
>On Mon, 27 Sept 2021 at 20:32, Bo Berglund <bo.berglund at gmail.com> wrote:
>
>> After reading up a bit more I have concluded the following to be true
>> since the
>> documentation specifically says that files are relative to the *source
>> dir*:
>>
>> rsync -a --exclude-from='home/user/rsyncexcude.txt' / /mnt/backup/20210927/
>>
>
>Good luck!
>
>According to the man page there is an option -n (long format --dry-run)
>which will
>"perform a trial run with no changes made"
>
>I haven't used it - yet.
>
>Am interested to know how things work for you.
>

I have run some tests only involving the Download dir in my home, which includes
some files I want to exclude.
This uncovered that the path in the command line:
exclude-from='home/user/rsyncexcude.txt'
actually must be a full actual path!

It worked when I ran the command from / but when I moved into my home dir and
ran the exact same command it failed to find the file...
It actually seems like it uses the current dir from where rsync is called as a
base dir when trying to find the exclude-from file.

I tested with this in the exclude file:
unt*/video/*.mp4

This is a test to exclude a video file in Download/untrunc-master/video/ but
using two wildcards (which does not work on the command line with ls...).
rsync is fine with these two wildcards.

Now it is evening tea-time here...


-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list