Score:0

How to use the restore command to restore a backup made with dump?

jm flag

I need help restoring a backup made with the complementary dump command.

Previously I was able to save data from a Ubuntu 20.04.5 install with the dump command as binary file on an external USB drive. I tested the backup and I'm able to read it but not to restore it. Meanwhile I moved forwards and reinstalled the OS on same hardware. I chose to wipe all data on the NVMe SSD first.

I used the command restore with flags operating from a live (systemrescue9.05) medium in 'interactive' mode, reading from the binary file using: restore -iaN -f /mnt/save/binary-file. I invoked the command from root '/' of the live medium.

Path to binary file mentioned, path to root from device where data should become restored: '/mnt/source/'. The binary file contains my saved /home directory.

Here sharing output of what I tried at a terminal:

  • remark I chose to access a small directory '/home/alexandre/PDF' from the binary file,
  • remark I tried several times to extract, leading to different errors...

{user@pcname}# restore -iaN -f /mnt/save/binary-file
restore > add /home/alexandre/PDF
restore > extract
restore: <name unknown>: ftruncate: Invalid argument
restore > extract
Extract requested files
Mount tape volume 1
Enter ``none'' if there are no more tapes
otherwise enter tape name (default: /mnt/save/Uhome001) none
You have not read any volumes yet.
Unless you know which volume your file(s) are on you should start
with the last volume and work towards the first.
Specify next volume # (none if no more volumes): 1
Mount tape volume 1
Enter ``none'' if there are no more tapes
otherwise enter tape name (default: /mnt/save/Uhome001) none
./home/alexandre/PDF/How_to_Create_a_Dashboard_to_Dominate_the_Stock_Market_Using_Pyt-job_112.pdf: (inode 104071885) not found on tape
./home/alexandre/PDF/Gmail_-_richtlijnen_bij_covid_bewoners__nerated_files-job_66.pdf: (inode 104072160) not found on tape
./home/alexandre/PDF/Gmail_-_diverse_puntjes_zelfroosteren__enerated_files-job_122.pdf: (inode 104072268) not found on tape
./home/alexandre/PDF/Gmail_-_OCMW-Brugge_en_verenigingen_-_syndicaal_overleg_IFIC__-job_76.pdf: (inode 104073187) not found on tape
./home/alexandre/PDF/Persoonsinformatie.pdf: (inode 104074284) not found on tape
Add links
Set directory mode, owner, and times.
set owner/mode for '.'? [yn] 
restore: chown: No such file or directory
restore: chown: No such file or directory
restore > ls
./home/alexandre/PDF:
104072159 ./
 89915394 ../
104073187 Gmail_-_OCMW-Brugge_en_verenigingen_-_syndicaal_overleg_IFIC__-job_76.pdf 
104072268 Gmail_-_diverse_puntjes_zelfroosteren__enerated_files-job_122.pdf 
104072160 Gmail_-_richtlijnen_bij_covid_bewoners__nerated_files-job_66.pdf 
104071885 How_to_Create_a_Dashboard_to_Dominate_the_Stock_Market_Using_Pyt-job_112.pdf 
104074284 Persoonsinformatie.pdf 

restore > extract
Extract requested files
Mount tape volume 1
Enter ``none'' if there are no more tapes
otherwise enter tape name (default: /mnt/save/Uhome001) none
Add links
Set directory mode, owner, and times.
set owner/mode for '.'? [yn] n
restore: chown: No such file or directory
restore: chown: No such file or directory
restore > extract
Extract requested files
Mount tape volume 1
Enter ``none'' if there are no more tapes
otherwise enter tape name (default: /mnt/save/Uhome001) none
Add links
Set directory mode, owner, and times.
set owner/mode for '.'? [yn] n
restore > ls
./home/alexandre/PDF:
104072159 ./
 89915394 ../
104073187 Gmail_-_OCMW-Brugge_en_verenigingen_-_syndicaal_overleg_IFIC__-job_76.pdf 
104072268 Gmail_-_diverse_puntjes_zelfroosteren__enerated_files-job_122.pdf 
104072160 Gmail_-_richtlijnen_bij_covid_bewoners__nerated_files-job_66.pdf 
104071885 How_to_Create_a_Dashboard_to_Dominate_the_Stock_Market_Using_Pyt-job_112.pdf 
104074284 Persoonsinformatie.pdf 

restore > add
restore > extract
Extract requested files
Mount tape volume 1
Enter ``none'' if there are no more tapes
otherwise enter tape name (default: /mnt/save/Uhome001) none
You have not read any volumes yet.
Unless you know which volume your file(s) are on you should start
with the last volume and work towards the first.
Specify next volume # (none if no more volumes): none
./home/alexandre/PDF/How_to_Create_a_Dashboard_to_Dominate_the_Stock_Market_Using_Pyt-job_112.pdf: (inode 104071885) not found on tape
./home/alexandre/PDF/Gmail_-_richtlijnen_bij_covid_bewoners__nerated_files-job_66.pdf: (inode 104072160) not found on tape
./home/alexandre/PDF/Gmail_-_diverse_puntjes_zelfroosteren__enerated_files-job_122.pdf: (inode 104072268) not found on tape
./home/alexandre/PDF/Gmail_-_OCMW-Brugge_en_verenigingen_-_syndicaal_overleg_IFIC__-job_76.pdf: (inode 104073187) not found on tape
./home/alexandre/PDF/Persoonsinformatie.pdf: (inode 104074284) not found on tape
Add links
Set directory mode, owner, and times.
set owner/mode for '.'? [yn] y
Alexandre De Muer avatar
jm flag
I guess I should be more specific: data to be saved was on an internal nvme ssd. I was able to backup from the external usb live medium to an (also) external usb drive issuing the command 'dump -0f -M /mnt/save/binary-file /mnt/source/'. Don't judge me for the latter: I now guess should have been 'dump -0af /mnt/save/binary-file /mnt/source/'... Considering the restore command I issued. the 'N' switch is similar to 'dry-run' known to rsync. Thus not of any good when restoring.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.