1 Title: Backup/Restore: Fix vanishing files terminating a backup
10 The "omd backup" mechanism recursively backups all site related
11 files of a Check_MK site. When files in a site directory, that
12 is currently being processed vanish, this could lead to failed
13 backups with errors like this:
16 Site backup failed: Traceback (most recent call last):
17 File "/omd/versions/1.5.0p8.cee/bin/omd", line 4553, in
18 command_function(args, command_options)
19 File "/omd/versions/1.5.0p8.cee/bin/omd", line 3711, in main_backup
20 backup_site_to_tarfile(fh, tar_mode, options)
21 File "/omd/versions/1.5.0p8.cee/bin/omd", line 3686, in backup_site_to_tarfile
22 backup_site_files_to_tarfile(tar, options)
23 File "/omd/versions/1.5.0p8.cee/bin/omd", line 3556, in backup_site_files_to_tarfile
24 tar.add(g_sitedir, g_sitename, exclude=filter_files)
25 File "/omd/versions/1.5.0p8.cee/lib/python2.7/tarfile.py", line 2032, in add
26 recursive, exclude, filter)
27 File "/omd/versions/1.5.0p8.cee/lib/python2.7/tarfile.py", line 2032, in add
28 recursive, exclude, filter)
29 File "/omd/versions/1.5.0p8.cee/lib/python2.7/tarfile.py", line 2032, in add
30 recursive, exclude, filter)
31 File "/omd/versions/1.5.0p8.cee/lib/python2.7/tarfile.py", line 2032, in add
32 recursive, exclude, filter)
33 File "/omd/versions/1.5.0p8.cee/lib/python2.7/tarfile.py", line 2032, in add
34 recursive, exclude, filter)
35 File "/omd/versions/1.5.0p8.cee/lib/python2.7/tarfile.py", line 2009, in add
36 tarinfo = self.gettarinfo(name, arcname)
37 File "/omd/versions/1.5.0p8.cee/lib/python2.7/tarfile.py", line 1881, in gettarinfo
38 statres = os.lstat(name)
39 OSError: [Errno 2] No such file or directory: '/omd/sites/xyz/var/pnp4nagios/perfdata/hastenichgesehn/Interface_BG4_2OG_VLAN_421.xml.new'
42 After this change the backup continues in such a situation
43 excluding the just vanished file.