Re: difficulty creating tar.gz file for "home" folder
Originally Posted by
gregg3
I was unable to copy my home folder (I wanted to back it up) to a flash drive. and someone here in the forum suggested putting the contents of the home folder into a tar.gz file. So I learned how to make tar.gz files via this formula:
tar czf new-tar-file-name.tar.gz file-or-folder-to-archive
However when I tried to make a tar.gz file for the home folder and entered this (in the terminal):
tar czf BackupSpecial.tar.gz home
(I'm naming my file BackupSpecial) it didn't work.
Here's the screenshot.
Can somebody please help me get this to work? Thanks.
Your in your root directory, which you do not have permission to write to.
Perhaps,
Code:
sudo mkdir /opt/backup
sudo chown -R gregory:gregory /opt/backup
tar czf /opt/backup/HomeBackup.tar.gz /home
Which will create a HomeBackup.tar.gz file in /opt/backup that you can access.
There are also other ways of backing up automatically, such as using duplicity, crashplan, rsync, and clonezilla to name a few.
Don't waste your energy trying to change opinions ... Do your thing, and don't care if they like it.
Bookmarks