0

I am using a live cd to take backup of a file.This was my problem.

Now I want to use tar to backup a single file Phone academics where I have accumulated other files and I want to create the backup in the same folderPhone cademics at /media/ubuntu/af89d536-745d-4899-971b-27cba56930be/alpha/Desktop/Phone academics.

I changed the directory using cd /media/ubuntu/af89d536-745d-4899-971b-27cba56930be/alpha/Desktop/Phone academics which gives the result:
bash: cd: /media/ubuntu/af89d536-745d-4899-971b-27cba56930be/alpha/Desktop/Phone: No such file or directory

So I opened terminal from the folder Phone academics so the directory changes to phone academics atomatically. Is this the right way to change? It now looks like:

enter image description here

If I use this code tar -cvf backupphoneacademics.tar/ media/ubuntu/af89d536-745d-4899-971b-27cba56930be/alpha/Desktop/Phone academics --exclude backupphoneacademics.tar It gives:
tar: backupphoneacademics.tar/: Cannot open: Is a directory ; tar: Error is not recoverable: exiting now

What is wrong here? what do I do to take backup of that single file in the same folder?

Spectra
  • 211
  • 2
    Your tar command may have a mis-placed slash and a missing escape: tar -cvf backupphoneacademics.tar /media/ubuntu/af89d536-745d-4899-971b-27cba56930be/alpha/Desktop/Phone\ academics --exclude backupphoneacsdemics.tar – matigo May 31 '21 at 14:45
  • Oh thanks..that worked, however files were not backedup...permission denied tar: backupphoneacademics.tar: Cannot open: Permission denied tar: Error is not recoverable: exiting now – Spectra May 31 '21 at 14:51
  • 1
    Where are you trying to save the .tar file? Is it a writable location? – matigo May 31 '21 at 14:56
  • It is saved in a writable location but the location from which I am trying to take backups is not readable or writable..:/ – Spectra May 31 '21 at 14:59

0 Answers0