Cannot Savedir Input/output Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about tar cannot read: input/output error hiring developers or posting ads with us Unix & Linux Questions Tags Users Badges Unanswered Ask
Tar Cannot Close Input/output Error
Question _ Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them;
Tar: Cannot Write: Input/output Error
it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Cannot open: Input/output error with tar command in a shell
Tar Cannot Open: Input/output Error
script up vote 5 down vote favorite I am trying to create a tar ball in a shell script (I have enabled set -x), but I get an error: + cd /home5/mysite/public_html + TAR_DUMP=gypo_2012-02-18-03:51:15.tar.gz + echo 'Tar name: gypo_2012-02-18-03:51:15.tar.gz' Tar name: gypo_2012-02-18-03:51:15.tar.gz + tar -cvzf gypo_2012-02-18-03:51:15.tar.gz gypo ... tar: gypo_2012-02-18-03\:44\:04.tar.gz: Cannot open: Input/output error tar: Error is not recoverable: exiting now ... The script is the following: NOW=$(date +"%Y-%m-%d-%T") # TAR cd $HOME/public_html TAR_DUMP="gypo_$NOW.tar.gz" echo "Tar name: $TAR_DUMP" tar -cvzf linux tape drive input output error $TAR_DUMP gypo # mv -t $DEST $TAR_DUMP Why is tar generating this error and how can I solve it? Thanks. shell-script filenames tar share|improve this question edited Feb 18 '12 at 23:58 Gilles 370k676711120 asked Feb 18 '12 at 10:57 JVerstry 3541717 add a comment| 1 Answer 1 active oldest votes up vote 5 down vote accepted The : in the filename are confusing tar. At least for the coreutils version of tar, the --file switch can take an argument of the form: hostname:/remote/file/name so I'm guessing tar is trying to interpret that filename in a manner that is not what you meant. Prefixing the file name with ./ (or specifying a full path) should solve your problem. TAR_DUMP="./gypo_$NOW.tar.gz" echo "Tar name: $TAR_DUMP" tar -cvzf $TAR_DUMP gypo Another fix would be to add the --force-local switch. --force-local Forces `tar' to interpret the filename given to --file as a local file, even if it looks like a remote tape drive name. share|improve this answer answered Feb 18 '12 at 11:16 Mat 29.8k591114 Adding ./ solved the issue, many many thanks !!! –JVerstry Feb 18 '12 at 11:30 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy polic
Help Here Applications Tar : Cannot open: Input/output error Welcome! If this is your first visit, be sure to check out the FAQ. You will have to register before you can post in the forums. bin tar input output error (Be aware the forums do not accept user names with a dash "-") Also, linux input/output error logging in lets you avoid the CAPTCHA verification when searching . Select Articles, Forum, or Blog. Posting in the Forums implies acceptance of the Terms and Conditions. Results 1 to 10 of 10 Thread: Tar : Cannot open: Input/output error Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid http://unix.stackexchange.com/questions/32036/cannot-open-input-output-error-with-tar-command-in-a-shell-script Mode Switch to Threaded Mode 18-Feb-2009,09:57 #1 mattfletcher View Profile View Forum Posts View Blog Entries View Articles Newcomer Join Date Dec 2008 Posts 6 Tar : Cannot open: Input/output error Can anyone tell me why this does not work? tar cfz "bigfile_`date '+%R-%F'`".tgz bigfile.matt bigfile_16: Unknown host tar: bigfile_16\:55-2009-02-18.tgz: Cannot open: Input/output error tar: Error is not recoverable: exiting now I'm running a script in cron that creates https://forums.opensuse.org/showthread.php/408185-Tar-Cannot-open-Input-output-error very large log files every four hours, so at the end of the script i want it to tar the log file and name it with a date / timestamp as there will be lots and lots of these files if i ever get it to work. I suspect it has something to do with the date format having strange characters and or spaces ?? Thanks Reply With Quote 18-Feb-2009,12:36 #2 smpoole7 View Profile View Forum Posts View Blog Entries View Articles Parent Penguin Join Date Oct 2008 Location Birmingham. AL Posts 848 Re: Tar : Cannot open: Input/output error You may have a formatting error, but on first glance, you need to put the "f" spec last in the options. That's how you specify the filename. Reply With Quote 18-Feb-2009,16:13 #3 ken_yap View Profile View Forum Posts View Blog Entries View Articles Flux Capacitor Penguin Join Date Jun 2008 Location UTC+10 Posts 9,936 Re: Tar : Cannot open: Input/output error No, as c doesn't take an option, so f will take the next one. You were right about strange characters. The problem is the colon generated by the date command. Tar has been enhanced to write to remote tape devices via rmt so that part
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of Conduct Ubuntu Wiki Community Wiki Other Support Launchpad Answers Ubuntu IRC Support AskUbuntu Official Documentation https://ubuntuforums.org/showthread.php?t=1437815 User Documentation Social Media Facebook Twitter Useful Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! Ubuntu Ubuntu Insights Planet Ubuntu Activity Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Official Flavours Support Hardware [SOLVED] HP tapedrive input/output error Having an Issue With Posting ? Do you want to help us debug the posting issues ? < is the place to report it, thanks output error ! Results 1 to 6 of 6 Thread: HP tapedrive input/output error Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode March 24th, 2010 #1 calyx View Profile View Forum Posts Private Message Visit Homepage First Cup of Ubuntu Join Date Apr 2005 Location Dublin, Ireland Beans 8 DistroUbuntu HP tapedrive input/output error I'm trying to set a backup to input output error tape of a machine using flexbackup. However any attempt to write to the tape drive (via either flexbackup or just tar) results in "/dev/st0: Input/output error" The machine seems to recognise the drive ( HP Storageworks Ultrium 448 ) and that there's a tape in it and "mt status" seems to work... "mt -f /dev/st0 rewind" or "erase" throw no errors... Code: root@stor001:/# mt status SCSI 2 tape drive: File number=0, block number=0, partition=0. Tape block size 0 bytes. Density code 0x42 (LTO-2). Soft error count since last status=0 General status bits on (41010000): BOT ONLINE IM_REP_EN root@stor001:/# cat /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 00 Lun: 00 Vendor: HL-DT-ST Model: DVDRAM GSA-4084N Rev: KS02 Type: CD-ROM ANSI SCSI revision: 05 Host: scsi2 Channel: 00 Id: 03 Lun: 00 Vendor: HP Model: Ultrium 2-SCSI Rev: S65D Type: Sequential-Access ANSI SCSI revision: 03 "tell" does however Code: root@stor001:/# mt -f /dev/st0 tell /dev/st0: Input/output error Based on a forum post I found elsewhere, I tried: Code: root@stor001:/# dd if=/dev/zero of=/dev/nst0 bs=1024 count=10 10+0 records in 10+0 records out 10240 bytes (10 kB) copied, 5.0815 s, 2.0 kB/s which gave the person on the forum an error but seems to work for me. If anyone has any suggestions, I'd appreciate it