Results 1 to 3 of 3

Thread: Backing up with tar to USB Stick - Says I am out of space - but I am not

  1. #1
    Join Date
    Oct 2013
    Beans
    34

    Backing up with tar to USB Stick - Says I am out of space - but I am not

    I am backing up with tar to a usb stick. It says I am out of space but I have up to ten more gigs.

    Code:
    user@machine:/media/robert/32GB$ tar -czvf archive.tar.gz /home/user >> stdout.txt 2> stderr.txt
    gzip: stdout: No space left on device
    tar: archive.tar.gz: Wrote only 8192 of 10240 bytes
    tar: Child returned status 1
    tar: Error is not recoverable: exiting now
    I still have over 10G of space left on my USB stick.

    Can someone please tell me what I am doing wrong? Any help would be greatly appreciated.
    Last edited by DuckHook; October 28th, 2018 at 01:55 AM. Reason: Added [CODE] tags for clarity

  2. #2
    Join Date
    May 2008
    Beans
    152

    Re: Backing up with tar to USB Stick - Says I am out of space - but I am not

    The USB stick is probably formatted FAT32, which allows a maximum file size of 4GB. If you try to create a larger file than that you will get an "out of space" error. If you need large file support you'll need to reformat with a suitable filesystem.

  3. #3
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Backing up with tar to USB Stick - Says I am out of space - but I am not

    ↑+1

    @robertcull1

    If you will only be using this stick for Linux (and it sounds like you will, else tar/gz wouldn't make sense), then consider formatting either with ext2 or with ext4 possibly minus journaling.

    Gparted will format the drive to your filesystem of choice.

    To turn off ext4 journaling:
    Code:
    sudo tune2fs -O ^has_journal /dev/sdxN
    …where "xN" is the specific device number of your USB stick.

    *Note* You don't really have to turn off journaling and keeping it adds data integrity which you may want, but disabling it extends the life of your USB stick.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •