Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 27528  / 1 Year ago, sat, february 4, 2023, 9:07:54

I am trying to backup my Ubuntu workstation by the help of this guide and are running into trouble as the tar command outputs




Exiting with failure status due to previous errors.




Here's what I ran in terminal:



sudo -i
cd /
tar -cvpzf sysbackup-20110821.tar.gz
--exclude=/sysbackup-20110821.tar.gz
--exclude=/proc
--exclude=/lost+found
--exclude=/sys
--exclude=/mnt
--exclude=/media
--exclude=/dev /


So from searching a bit, the error seems to be of a non-critical nature, but as I checkout the contents of the actual .tar file, my /home-folder is missing, so obviously something went clearly wrong.



What should I do instead to backup my system without errors?


More From » backup

 Answers
7

I suggest a command line as the following:



tar -cvpzf sysbackup-20110821.tar.gz --one-file-system 
--exclude=/sysbackup-20110821.tar.gz
--exclude=./run
--exclude=./tmp
--exclude='./home/*/.gvfs' ./


As you see, every exclude pattern becomes a relative path, and the --one-file-system option excludes /dev, /proc, /sys, and everything mounted under /media or /mnt.



Nevertheless, if you have a separate home partition, this is not backed up.



Tested on 11.10 (Oneiric, alpha3). Probably, in previous ubuntu versions you should exclude ./var/run, instead of /run.


[#43769] Sunday, February 5, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
chilgirlguid

Total Points: 123
Total Questions: 114
Total Answers: 121

Location: Macau
Member since Mon, Nov 16, 2020
4 Years ago
;