How to backup before a release upgrade from Ubuntu 18.04.5 LTS server?
Bo Berglund
bo.berglund at gmail.com
Sun Sep 26 11:17:49 UTC 2021
On Sun, 12 Sep 2021 18:46:10 +0200, Ralf Mardorf via ubuntu-users
<ubuntu-users at lists.ubuntu.com> wrote:
>On Sun, 12 Sep 2021 14:52:20 +0200, Bo Berglund wrote:
>>I just have to figure out how to exclude certain directories from the
>>backup.
>>
>>And what happens with stuff that has been symlinked to two places like
>>my www dir, will it be copied from both places then making the archive
>>twice as big?
>>
>>And why the need to shut down the server and boot it with installation
>>media?
>
>Hi,
>
>tar provides to "exclude" patterns, but IMO those are tricky to use, my
>recommendation is not to use an "exclude" pattern, unless you really
>know what you are doing.
>
>The good news, tar doesn't follow symlinks, it just backups the symlink
>file.
>
>The shutdown is needed, because you cannot lock everything, so if you
>backup a running system, you backup a system in different
>(probably inconsistent) states.
>
>The successors of the AT&T UNIX "dump" utility can make a backup of a
>file system in progress, if the file system provides to do snapshots.
>
>I'm a litle bit confused, since
>http://manpages.ubuntu.com/manpages/bionic/man8/dump.8.html claims
>"dump - ext2/3/4 filesystem backup".
>
>https://en.wikipedia.org/wiki/Snapshot_(computer_storage)
>
So now I have explored a number of alternatives and found most to be very
complicated to use...
It seems like rsync would be my best bet and then I have a couple of questions
concerning the rsync handling:
1) How does rsync treat symlinks?
Does rsync just copy the link itself or does it try to follow into the linked
directory tree too? If it does than how do I switch that off?
It makes no sense to copy a set of files twice...
I have a huge file tree below $HOME/www which is symlinked into the Apache
/var/... start and this should not be copied twice!
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.
Is there such a file in *every* dir or can I specify the absolute path to the
file (rsync seems generally not to want absolute paths).
Or must it be in the current dir when rsync is launched, how do I specify that
if I run rsync from cron???
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list