I was running a backup with tar in the terminal and locked my screen before leaving my system for a short while. After I returned tar had stopped archiving my files.
Why did tar stop working after I locked my screen even though I didnt close the laptop lid to shut it down?
Is there a way to resume the backup? The process hasn't been killed and it had gone really far so maybe there's a way.
I started the backup with: tar --exclude={File1,File2,File3} -cvpjf backup.tar.bz .
I noticed the backup had stopped when I returned and unlocked my screen. I had been gone for almost 20 minutes and I saw that the cursor in the terminal was static. It was no longer printing output to show what tar was doing according to verbose mode. Instead it has that blinking cursor you get when you are typing a comment and the the cursor (" | ") keeps blinking.
update
I stopped the backup with the shortcut Ctrl + Z
. Then I tried resuming the backup with the command fg
but it failed to resume and returned this output:
tar --exclude={File1,File2,File3} -cvpjf backup.tar.bz .
tar: ./WindowsImageBackup/DESKTOP-IASDK/Backup 2018-05-14 102113/b7230501-0000-0000-0000-501f00000000.vhdx: Read error at byte 66575985152, while reading 10240 bytes: Input/output error
bzip2: I/O or other error, bailing out. Possible reason follows.
bzip2: Input/output error
Input file = (stdin), output file = (stdout)
tar: backup.tar.bz2: Wrote only 8192 of 10240 bytes
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Just to mention, that last ID the error shows i.e. tar: ./WindowsImageBackup/DESKTOP-IASDK/Backup 2018-05-14 102113/b7230501-0000-0000-0000-501f00000000.vhdx: Read error at byte 66575985152, while reading 10240 bytes: Input/output error
is the last line the terminal printed before I locked my screen. This confirms that locking my screen did stop the archive process because I intervened by using Ctrl + Z
atleast 2 hrs after the last line was printed.