I have a little bash script going to check if the system has been backed up today and and if it hasn't then it copies the entire filesystem into the backups folder:
date=$(date +"%m%d%y")
sudo mkdir -p "/backups/system/$date"
sudo cp -r "/" "/backups/system/$date"
My problem is that when I enter this it gives me these errors:
cp: error reading ‘/proc/1/task/1/mem’: Input/output error
cp: failed to extend ‘/backups/system/040315/proc/1/task/1/mem’: Input/output error
cp: error reading ‘/proc/1/task/1/clear_refs’: Invalid argument
cp: failed to extend ‘/backups/system/040315/proc/1/task/1/clear_refs’: Invalid argument
/backups
is a subdirectory of/
, then the backups directory itself will be included in the backup. Also,/proc
doesn't contain any actual files, it holds virtual files used by the system as it runs; you don't need or even want to be making backups of those. – Carl H Apr 03 '15 at 15:18