Guest User

Untitled

a guest
Nov 21st, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. tar -czvf example.tar.gz -C /path/to/exclude/ /path/to/files/*.file -T /path/files_list
  2. tar -czvf example2.tar.gz -C /path/to/exclude2/ /path/to/files/*.file2 -T /path/files_list
  3.  
  4. tar: /path/to/files/*.file: Cannot stat: No such file or directory
  5.  
  6. cd /path/to/files/
  7. ls *.file > files_list
  8. tar -czvf example.tar.gz -T files_list
  9.  
  10. find ./source/77TR_2/ -iname '*.DBF' | tar czf 77TR_2-`date +%F`.tar.gz --files-from=-
  11.  
  12. root@srv2:~# cat /usr/local/bin/backup-base.sh
  13. #!/bin/bash
  14.  
  15. PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  16.  
  17. lvcreate -L1G -s -n back-bases /dev/lghost/bases
  18. mkdir -p /backup/source
  19. mount -o ro,offset=1048576 /dev/lghost/back-bases /backup/source
  20. cd /backup/
  21. find ./source/77TR_1/ -iname '*.DBF' | tar czf 77TR_1-`date +%F`.tar.gz --files-from=-
  22. find ./source/77TR_2/ -iname '*.DBF' | tar czf 77TR_2-`date +%F`.tar.gz --files-from=-
  23. umount /backup/source
  24. lvremove -f /dev/lghost/back-bases
Add Comment
Please, Sign In to add comment