[MCOL-3433] columnstoreBackup - Error when soft-link is setup for mysql/db on an install Created: 2019-08-15  Updated: 2023-10-26  Resolved: 2023-03-06

Status: Closed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: 1.1.5
Fix Version/s: Icebox

Type: Bug Priority: Major
Reporter: David Hill (Inactive) Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Environment:

test system - Amazon AMI non-root install 2um 2pm
Backup server - Used UM2 for testing


Epic Link: Consolidate & Redevelop All Columnstore Tools (SDK, Adapters, Backup, Restore, mcsimport)

 Description   

Customer reported an issue of the backup/restore not working on their system that had soft-links setup for their mysql/db directory and for the DBROOT directory.

This error was reported:

/dump/mariadb/catcsut01/um1/db" failed: No such file or directory

This is what their backup directory looked like:

cd /dump/mariadb/catcsut01
[root@nyvmdbd153 catcsut01]# ls -al
total 23
drwxr-xr-x 9 root root 1024 Aug 12 18:51 .
drwxr-xr-x 4 root root 96 Aug 8 19:32 ..
drwxr-xr-x 7 root root 96 Aug 12 18:20 backup.1
drwxr-xr-x 2 root root 96 Aug 12 18:20 backup.2
drwxr-xr-x 2 root root 96 Aug 12 18:20 backup.3
drwxr-xr-x 3 root root 96 Aug 12 18:20 cnf
rw-rr- 1 root root 20947 Aug 2 08:43 Columnstore.xml
drwxr-xr-x 3 root root 96 Aug 12 18:20 pm1dbroot1
drwxr-xr-x 3 root root 96 Aug 12 18:20 pm2dbroot1
rw-rr- 1 root root 24 Jul 17 19:49 releasenum
drwxr-xr-x 2 root root 96 Aug 12 18:51 restoreConfig
lrwxrwxrwx 1 root root 34 Aug 2 07:55 um1 -> /data/mariadb/columnstore/mysql/db
lrwxrwxrwx 1 root root 34 Aug 2 08:16 um2 -> /data/mariadb/columnstore/mysql/db

So for some reason, the backup tool is creating a soft-link for um1 and um2 from the system it backed up where there was a softlink.

Customer softlink was on UM1

ln -s /data/mariadb/columnstore/mysql/db /usr/local/mariadb/columnstore/mysql/db

--------------------------------------------------------
I reproduced the same issue on my test system, non-root ami setup 2um 2pm

I did softlinks for UMs

ln -s /home/mysql/db /home/mysql/mariadb/columnstore/mysql/db

Then ran:

./columnstoreBackup --user=mysql --install-dir=/home/mysql/mariadb/columnstore 172.31.33.80 columnstoreBackupData

Here are the results from the run in the columnstoreBackupData directory

ll
total 24
drwxrwxr-x 7 mysql mysql 75 Aug 15 14:48 backup.1
drwxrwxr-x 2 mysql mysql 6 Aug 15 14:48 backup.2
drwxrwxr-x 2 mysql mysql 6 Aug 15 14:48 backup.3
drwxrwxr-x 3 mysql mysql 36 Aug 15 14:48 cnf
rw-rr- 1 mysql mysql 20451 Aug 15 14:39 Columnstore.xml
drwxrwxr-x 3 mysql mysql 19 Aug 15 14:48 pm1dbroot1
drwxrwxr-x 3 mysql mysql 19 Aug 15 14:48 pm2dbroot1
rw-rr- 1 mysql mysql 24 Jul 17 23:49 releasenum
lrwxrwxrwx 1 mysql mysql 14 Aug 15 14:37 um1 -> /home/mysql/db
lrwxrwxrwx 1 mysql mysql 14 Aug 15 14:38 um2 -> /home/mysql/db

So in my test when running on a UM. now both UM1 AND UM2 backup directories is pointing
to the system 'mysqld/db' directory... OPS, not good..



 Comments   
Comment by David Hill (Inactive) [ 2019-08-20 ]

With some input and succession from CS Product Manager, I tried a work-around that worked.

When the 'rsync' script runs, it needs to have the option '-L' to create the directory and contents instead of creating the soft-links.

In my testing, I changed this line in the script, line 259

rsyncOptions="-a " -> rsyncOptions="-a -L "

Comment by Todd Stoffel (Inactive) [ 2023-03-06 ]

This ticket was created prior to convergence with the server and may be obsolete. If you find this issue still exists in a modern version, please open a new ticket.

Generated at Thu Feb 08 02:42:42 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.