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

Bo Berglund bo.berglund at gmail.com
Mon Sep 27 19:29:57 UTC 2021


On Sun, 26 Sep 2021 12:53:04 +0100, Chris Green <cl at isbd.net> wrote:

>> 2) Using --exclude-from option, where is the file located?
>> I understand that I can specify the excludes to be read from file this way, but
>> I have yet to figure out where to place the exclude spec file.
>
>Where you want, the =FILE tells rsync where you have put the file, you
>probably should use an absolute path to the file to guarantee that
>rsync always finds it.  If you don't give it an absolute path then I
>think it will be relative to the directory from which you're running
>rsync.
>
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/

This means to copy everything recursively from the source dir (/) to the
external drive mounted on /mnt/backup/ into destination dir 20210927 there
(which will be created if non-existent).

And the excludes are read from a file in the directory relative to the source
directory, i.e. /home/user/rsyncexcude.txt

I have not seen that one can use an absolute path here...

As I understand it, the excludes are checked for each processed file in the
order the excludes are written in the exclude file until a match is found. So
after a match the search stops.

Will test all this.

-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list