Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 11942  / 1 Year ago, sat, november 26, 2022, 12:03:28

I looked at the other question addressing this issue but I think I might have a different setup.



I too am trying to backup my Ubuntu machine, but here is the difference. I used Wubi to install Ubuntu 11.10 alongside Vista on my laptop. I have spent considerable time getting to this point in the setup that I decided that it was probably a good bet to back it all up to my external hard-drive.



So from various sources I gathered this:
First I navigated to my external hard-drive then I created a backup folder on this drive and then I entered the following from the terminal:



sudo tar cvpzf mybackup.tgz2 --exclude="/host/*"  --exclude="/media/*" --exclude="/mnt/*" --exclude="/proc/*" --exclude="/tmp/*" /


And the process ran for about 20 minutes when it finally kicked out with the exiting message. I did notice the there were some read errors early on but it carried on processing then it had three 'files changes as we were reading' and 3 to 4 minutes later it exited.



Anyone have suggestions as what I can do to get this backup?



After running the backup now only with sudo tar cpf and all the previous exclusions plus adding --exclude="/dev/" I got these error:



tar: removing '/' from front of names
tar: /sys/module/bnep/sections/__mount_loc: file sharnk by 4085 bytes; padding with zeroes …. a whole bunch of these the paths are different
tar: /home/tom/.gvfs: cannot stat: permission denied
tar: /run/synaptic.socket: socket ignored …. 8 of these different folders
tar: /var/lib/citadel/data: file changes as we read it …. 5 of these different folders


Hopefully someone understands what is happening because I am a little alarmed that I have these errors. Thanks for any help or suggestions.


More From » tar

 Answers
5

What the messages mean



First, let's look at the messages individually:




tar: removing '/' from front of names




You told tar to archive absolute paths. By default (unless you pass the -P option), tar stores relative paths, e.g. it stores etc/fstab when you tell it to store /etc/fstab. This helps if you want to untar your backup in some subdirectory (the tar program on Ubuntu does this when you extract as well, so storing the absolute path only makes a difference if you extract the archive on a non-Linux system). You can ignore that message.




tar: /sys/module/bnep/sections/__mount_loc: file sharnk by 4085 bytes; padding with zeroes




This error is within /sys. Like /proc, the files under /sys are not stored on your disk, they are generated on the fly by the kernel and it doesn't make sense to back them up.




tar: /home/tom/.gvfs: cannot stat: permission denied




~/.gvfs is a mount point used by GVFS, the component of the Gnome desktop environment that allows access to network filesystems, archives and more. There is nothing to back up here.




tar: /run/synaptic.socket: socket ignored




A socket is a “meeting place” between clients and a server. There is no data stored there, and the server will create the socket when it starts. Backing up sockets is not necessary, so this message is harmless.




tar: /var/lib/citadel/data file changes as we read it




That message is what it says on the tin. If a file changes while you're making the backup, you can't necessarily expect to have the latest version of the file.



The state of your backup



Most of these warnings are harmless; you can selectively turn them off.



Rather than exclude the directories you know about, exclude all mount points, so that you'll end up backing up only what's on your disk. If you have several partitions (e.g. if you have a separate /home), make sure to list them all.



tar -czf mybackup.tgz --one-file-system /


I would say that you have a complete backup at this point. Of course, you should test it before you erase your data.



Further advice



Unless you're short on disk space, I recommend cloning your installation so that you can run it directly off the USB disk. (See Moving linux install to a new computer; also How to migrate user settings and data to new machine?)



Unrelated note: there are several typos in your post — “file sharnk” (the actual message is “file shrank”), “file changes as we read it” (the actual message is “file changed as we read it”). You should be copy-pasting those! Not doing copy-paste tremendously reduces the confidence we can have that the situation is as you describe. If your system doesn't normally display messages in English, run export LC_MESSAGES=C first to have error messages in English.


[#42160] Saturday, November 26, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
nquirewha

Total Points: 256
Total Questions: 109
Total Answers: 122

Location: Namibia
Member since Mon, Feb 21, 2022
2 Years ago
nquirewha questions
Wed, Jan 26, 22, 03:38, 2 Years ago
Mon, Nov 1, 21, 13:50, 3 Years ago
Thu, Dec 1, 22, 09:23, 1 Year ago
;