5

I use a variant of the simple script below from the Community Ubuntu Documentation described

tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --exclude=/proc --exclude=/lost+found --exclude=/sys --exclude=/mnt --exclude=/media --exclude=/dev /

I used it again on Ubuntu 12.04 and I saw some files from the /run being skipped by the script. Should the /run directory be added to the excluded directories?

Shane Madden
  • 112,982
  • 12
  • 174
  • 248
vfclists
  • 1,562
  • 5
  • 20
  • 36

2 Answers2

4

No sure on Ubuntu 12.04 but, on Arch Linux /run is a tmpfs and on my Ubuntu 12.04 where only /var/run exists it is also a tmpfs. So if it is a tmpfs, what I assume, on 12.04 then you can exclude it.

Stone
  • 6,941
  • 1
  • 19
  • 33
3

Exclude it. The standard set of directories that I exclude in Linux backup processes are:

/dev
/lost+found
/media
/misc
/mnt
/net
/proc
/sys

and maybe /var/run

ewwhite
  • 194,921
  • 91
  • 434
  • 799