Advertisement
zefie

backup-extroot

Aug 20th, 2018
645
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.41 KB | None | 0 0
  1. #!/bin/sh
  2. Z_DATE=$(date "+%Y-%m-%d")
  3. Z_FILENAME="backup-extroot_${Z_DATE}.tgz"
  4. Z_MANIFEST="backup-extroot-installed-pkgs_${Z_DATE}.manifest"
  5.  
  6. rm -f /root/backup-extroot*${Z_DATE}*
  7.  
  8. touch /root/${Z_FILENAME}
  9. tar -zcvC /overlay -X /overlay/upper/root/${Z_FILENAME} -f /root/${Z_FILENAME} .
  10.  
  11. # List opkg-list-installed-extroot but without versions
  12. opkg-list-installed-extroot | cut -d' ' -f1 > ${Z_MANIFEST}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement