Uploaded image for project: 'Percona XtraBackup'
  1. Percona XtraBackup
  2. PXB-2422

Extracting fails when a file has a depth or 2 or more directories

Details

    • Bug
    • Status: Done
    • Low
    • Resolution: Fixed
    • 2.4.x, 8.0.x
    • 2.4.25, 8.0.28-20 (Q1 2022)
    • None
    • None

    Description

      When a stream is created with a file contained in a directory inside or another directory, the extraction fails.

       

       [email protected]:~/src/pxb$ make create
      echo "a" >> /home/ldonoso/anki.csv
      ~/src/pxb/bld-pxb-8.0/runtime_output_directory/xbstream -v -c /home/ldonoso/anki.csv > a.xb
      rm /home/ldonoso/anki.csv
      /home/ldonoso/src/pxb/bld-pxb-8.0/runtime_output_directory/xbstream: removing leading '/'.
      /home/ldonoso/anki.csv
      [email protected]:~/src/pxb$ make extract
      rm -rf /tmp/new_dir /home/ldonoso/anki.csv
      mkdir -p /tmp/new_dir
      cat a.xb | ~/src/pxb/bld-pxb-8.0/runtime_output_directory/xbstream -v -x -C /tmp/new_dir
      tree /tmp/new_dir/
      ls -l /home/ldonoso/anki.csv
      xbstream: Can't create directory './home/ldonoso/' (OS errno 2 - No such file or directory)
      /home/ldonoso/src/pxb/bld-pxb-8.0/runtime_output_directory/xbstream: failed to create file.
      exit code: 1
      /tmp/new_dir/0 directories, 0 files
      ls: cannot access '/home/ldonoso/anki.csv': No such file or directory
      make: *** [Makefile:51: extract] Error 2
      

       

      The posible solution is modifying the call to the c api `mkdir` so all the parent directories are created.

      Attachments

        Activity

          People

            luis.donoso Luis Donoso (Inactive)
            luis.donoso Luis Donoso (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 3 days, 4 hours
                3d 4h

                Smart Checklist