I used 2 commands cpio and tar to perform the same operation of backing up data to an external drive which is my 8Gb pen drive (sandisk brand). At the time of executing the commands, it outputs something implying that it has backed up something but when I check the media, it is blank.ravi@ravi-Aspire-5315:~/Documents/testing$ find . -type f -newer .last_time ./jill1ravi@ravi-Aspire-5315:~/Documents/testing$ find . -type f -newer .last_time | cpio -o > /dev/sdb21 blockravi@ravi-Aspire-5315:~/Documents/testing$ Now please look at the backed up media.ravi@ravi-Aspire-5315:/media/ravi$ df -h | grep sdb2/dev/sdb2       3.9G  8.0M  3.7G   1% /media/raviravi@ravi-Aspire-5315:/media/ravi$ lltotal 24drwxr-xr-x 3 ravi ravi  4096 Jan 12 11:10 ./drwxr-xr-x 3 root root  4096 Nov 20 13:51 ../drwx------ 2 root root 16384 Jan 12 11:10 lost+found/I tried many times by backing up all files also but noting is shown in the above directory /media/ravi which is mount point of /dev/sdb2I tried the tar command but the same issue.ravi@ravi-Aspire-5315:~/Documents/testing$ tar -cvf /dev/sdb2 `find . -type f -newer .last_time`./jill1Then I found that my media /dev/sdb2 got corrupted!Then to check the media via nautilus, I clicked on the media file.Here it is mentioning that the mount point is /media/ravi/poonbut df -h mentions a different mount point /media/raviravi@ravi-Aspire-5315:~/Documents/testing$ df -h | grep sdb/dev/sdb2       3.0T  3.0T  3.9G 100% /media/raviThe size is also wrongly shown now as 3.0T though it is 3.9 GB as shown in the command output in the beginning of this thread.The above is what I found in my pendrive.Before using this media, I 1st tried in an SD card of 32 GB. There also the issue was coming. So, I felt that the issue is with the SD card as I suspected the ingenuity of that card. But after using my branded 8GB pendrive (sandisk brand) bought from amazon.in, I am confirmed that the problem is something else.
Not able to see the backed up file in the backed up media
backup;tar;media;cpio
You need to treat /dev/sdb2 as either a raw partition or as a filesystem, not as both. It appears as though you created a filesystem on it at one point and mounted it at /media/ravi, but as soon as you piped tar or cpio output directly to /dev/sdb2, you ruined the filesystem.Either write to a file on the filesystem, or treat it as a raw device that you do not mount.(recreate the filesystem on /dev/sdb2 and mount it at /media/ravi)tar -cvf /media/ravi/backup.tar find . -type f -newer .last_timetar tf /media/ravi/backup.tar-or-umount /media/ravi ## if possibletar -cvf /dev/sdb2 find . -type f -newer .last_timetar tf /dev/sdb2