On 12/01/16 20:05, Bill Hill wrote:
On 12/01/2016 19:03, Chris Walker wrote:
it was taking a long time. It's trying to rsync /proc/kcore and it's
/proc is a virtual filesystem - no real files, just a "filesystem-like" view into the current state of the system. For example, /proc/meminfo is a summary of the state of the system's memory usage, or /proc/423/cmdline is the command line options for process 423, or /proc/fs/ext4/mmcblk0p2/options is a list of the current mount options of ext4 filesystem on partition 2 of device mmcblk0p2 And /proc/kcore is a look into the current kernel addressable memory space. Some of it will be real memory, most won't. So, you don't need to and shouldn't back up anything in /proc Or for that matter some of the other virtual/temporary file systems, e.g. /sys or possibly /tmp.
Bill
You know that list that started this:
Filesystem Size Used Avail Use% Mounted on devtmpfs 3.0G 0 3.0G 0% /dev tmpfs 3.0G 1.4M 3.0G 1% /dev/shm tmpfs 3.0G 940K 3.0G 1% /run /dev/sdb5 7.6G 7.2G 0 100% / /dev/sdb7 7.6G 5.6G 1.7G 78% /usr tmpfs 3.0G 0 3.0G 0% /sys/fs/cgroup tmpfs 3.0G 88K 3.0G 1% /tmp /dev/sdb8 849G 202G 647G 24% /home tmpfs 597M 12K 597M 1% /run/user/1000
A quick rule (that I've just invented) is probably back up anything that has a file system tmpfs or devtmpfs.
In my rsync backup job I have --exclude-from=excludefilelist
excludefilelist contains (amongst other things) /sys/* /dev/* /proc/* /media/* /mnt/* /tmp/* /lost+found/* /home/MAINUSER/.gvfs/* /home/MAINUSER/.gvfs /var/tmp/* /root/.Trash/* /root/.local/share/Trash/* *.iso home/MAINUSER/.local/share/Trash/* home/\*/.local/share/Trash/* /home/\*/.gvfs/* /exports/*
sys, dev, proc, aren't usually backed up media and mnt are mount points for external media/drives tmp and /var/tmp are temporary files - generally you don't need to backup these files Replace MAINUSER with the user you're logged on with when you backup on the .gvfs lines - I had some problems with these once upon a time. It's something to do with another temporary mounted file system I think. Do you really want to back up the trash? I exclude ISO files, as I have some CD images stored on my drive. I don't need them backed up. I could just download them again. I exclude /exports because I have some nfs4 file exports. These basically link/map somewhere on the disk back into here. If you back up this, it will basically backup some directories twice.
Be careful if you back the disk somewhere on the same disk. (Actually, in Linux, you probably have to be careful about this almost every time).
Imagine you are backing up all files on /. You are backing up to /mnt/externaldrive. /mnt/externaldrive is a subdirectory of /. If you back up / it will back up to /mnt/externaldrive that will begin to fill up. Eventually as the backup proceeds, it will start backing up /mnt/externaldrive. This directory includes all the files that it's backed up already, so it backs them up. As it does this, there are more files in /mnt/externaldrive, which it backs up, until your disk fills up.
The solution is to exclude the mount point for your backup drive, or all mount points (as I have done).
I hope that gives you some pointers
Steve