spacepaste

  1.  
  2. # These folders are excluded by default.
  3. exclude_folders = ["/run/*", "/lost+found/*", "/dev/*", "/proc/*", "/sys/*",
  4. "/boot/grub/*", "/media/*", "/tmp/*", "/mnt/*", ".gvfs",
  5. "$BRFOLDER"]
  6. # if the user wants to exclude his home folder, add it to the exclude list
  7. if not include_home:
  8. exclude_folders.append("/home/*")
  9. tar_default_args = ["cvpf", "--sparse"]
  10. tar_patched_args = ["--acls", "--selinux", "--xattrs"]
  11. tar_exclude_args = ["--exclude=" + folder for folder in exclude_folders]
  12. # Construct tar's argument list
  13. tar_args = tar_default_args + tar_exclude_args
  14. if use_patched_tar:
  15. tar_args += tar_patched_args
  16. print(tar_args)
  17.