4
0

incr03.at 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright 2006-2023 Free Software Foundation, Inc.
  4. # This file is part of GNU tar.
  5. # GNU tar is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 3 of the License, or
  8. # (at your option) any later version.
  9. # GNU tar is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. # Description:
  16. # Previous versions checked only mtime/ctime of directories during
  17. # incremental backups. As a result, it sufficed to rename a single file
  18. # to get full dump of the directory where it resided. Since v.1.15.91
  19. # tar checks directory contents as well, so in this case only the renamed
  20. # file is dumped.
  21. AT_SETUP([renamed files in incrementals])
  22. AT_KEYWORDS([incremental incr03 rename])
  23. AT_TAR_CHECK([
  24. AT_CHECK_TIMESTAMP
  25. AT_SORT_PREREQ
  26. mkdir directory
  27. genfile --file=directory/x
  28. genfile --file=directory/y
  29. sleep 1
  30. tar -cf archive.1 -g db directory
  31. mv directory/x directory/z
  32. cp db db.old
  33. tar -cf archive.2 -g db directory
  34. mv directory orig
  35. echo Listing of archive.1
  36. tar -tf archive.1 | sort
  37. echo Listing of archive.2
  38. tar -tf archive.2 | sort
  39. echo Directory after first restore
  40. tar -xf archive.1 -g db --warning=no-timestamp
  41. find directory | sort
  42. echo Directory after second restore
  43. tar -xf archive.2 -g db --warning=no-timestamp
  44. find directory | sort
  45. ],
  46. [0],
  47. [Listing of archive.1
  48. directory/
  49. directory/x
  50. directory/y
  51. Listing of archive.2
  52. directory/
  53. directory/z
  54. Directory after first restore
  55. directory
  56. directory/x
  57. directory/y
  58. Directory after second restore
  59. directory
  60. directory/y
  61. directory/z
  62. ],[],[],[],[gnu, oldgnu, posix])
  63. AT_CLEANUP
  64. # End of incr03.at