/[dtapublic]/projs/dtats/trunk/projs/20161029_server_scripts_automaint_cron/backup_ashley_david_pers_full
ViewVC logotype

Diff of /projs/dtats/trunk/projs/20161029_server_scripts_automaint_cron/backup_ashley_david_pers_full

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 136 by dashley, Sun Dec 18 00:57:31 2016 UTC revision 137 by dashley, Wed Jun 14 02:03:18 2017 UTC
# Line 38  cd /root/cronjob_sandbox Line 38  cd /root/cronjob_sandbox
38  #a new SSD, so delete the old before making the new.  #a new SSD, so delete the old before making the new.
39  rm -fR /hl/baks/ashley_david_personal_01/full_monthly/*  rm -fR /hl/baks/ashley_david_personal_01/full_monthly/*
40  #  #
41  #Make the directory.  #Make the main directory for all backup content.
42  mkdir /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}  mkdir /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}
43  #  #
44  #Make MD5 message digests of everything we intend to tar up.  #Make the sub-directory for the full backup.
45  find -L /hb/ashley_david_personal_01/full_monthly -type f -exec md5sum '{}' \; &>/hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/${1}${5}${6}_${10}${13}${14}.files.md5sum.txt  mkdir /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/full
46  #  #
47  #Make SHA512 message digests of everything we intend to tar up.  #Make MD5 message digests of everything we intend to tar up in the main backup.
48  find -L /hb/ashley_david_personal_01/full_monthly -type f -exec sha512sum '{}' \; &>/hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/${1}${5}${6}_${10}${13}${14}.files.sha512sum.txt  find -L /hb/ashley_david_personal_01/full_monthly -type f -exec md5sum '{}' \; &>/hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/full/${1}${5}${6}_${10}${13}${14}.files.md5sum.txt
49  #  #
50  #Tar up everything except for the backup symlinks themselves.  #Make SHA512 message digests of everything we intend to tar up in the main backup.
51  tar -c -v -z -h -f /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/${1}${5}${6}_${10}${13}${14}.files.tar.gz /hb/ashley_david_personal_01/full_monthly &>/hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/${1}${5}${6}_${10}${13}${14}.files.log.txt  find -L /hb/ashley_david_personal_01/full_monthly -type f -exec sha512sum '{}' \; &>/hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/full/${1}${5}${6}_${10}${13}${14}.files.sha512sum.txt
52  #  #
53  #Tar up the symlinks.  #Tar up everything in the main backup except for the backup symlinks themselves.
54  tar -c -v -z -f /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/${1}${5}${6}_${10}${13}${14}.symlinks.tar.gz /hb/ashley_david_personal_01/full_monthly &>/hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/${1}${5}${6}_${10}${13}${14}.symlinks.log.txt  tar -c -v -z -h -f /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/full/${1}${5}${6}_${10}${13}${14}.files.tar.gz /hb/ashley_david_personal_01/full_monthly &>/hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/full/${1}${5}${6}_${10}${13}${14}.files.log.txt
55  #  #
56  #Emit the file MD5s to stdout so they go in the larger log.  #Tar up the main backup symlinks.
57    tar -c -v -z -f /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/full/${1}${5}${6}_${10}${13}${14}.symlinks.tar.gz /hb/ashley_david_personal_01/full_monthly &>/hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/full/${1}${5}${6}_${10}${13}${14}.symlinks.log.txt
58    #
59    #Emit the main backup file MD5s to stdout so they go in the larger log.
60  echo "===== FILE MD5 MESSAGE DIGESTS ====="  echo "===== FILE MD5 MESSAGE DIGESTS ====="
61  cat /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/${1}${5}${6}_${10}${13}${14}.files.md5sum.txt  cat /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/full/${1}${5}${6}_${10}${13}${14}.files.md5sum.txt
62  #  #
63  #Emit the file SHA512s to stdout so they go in the larger log.  #Emit the main backup file SHA512s to stdout so they go in the larger log.
64  echo "===== FILE SHA512 MESSAGE DIGESTS ====="  echo "===== FILE SHA512 MESSAGE DIGESTS ====="
65  cat /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/${1}${5}${6}_${10}${13}${14}.files.sha512sum.txt  cat /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/full/${1}${5}${6}_${10}${13}${14}.files.sha512sum.txt
66  #  #
67  #Emit the log files to stdout so they go in the larger log.  #Emit the main backup log files to stdout so they go in the larger log.
68  echo "===== FILES ====="  echo "===== FILES ====="
69  cat /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/${1}${5}${6}_${10}${13}${14}.files.log.txt  cat /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/full/${1}${5}${6}_${10}${13}${14}.files.log.txt
70  #  #
71    #Emit the main backup symlink backup log files to stdout so they go in the larger log.
72  echo "===== SYMLINKS ====="  echo "===== SYMLINKS ====="
73  cat /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/${1}${5}${6}_${10}${13}${14}.symlinks.log.txt  cat /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/full/${1}${5}${6}_${10}${13}${14}.symlinks.log.txt
74    #
75    #We want to be really careful with this next section because of
76    #the recursive rm.  Want to be sure the directory exists.
77    if [ -d /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/full ] ; then
78       cd /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/full
79       split -b 1000m ${1}${5}${6}_${10}${13}${14}.files.tar.gz
80       XFILES=`ls -1 x*`
81       for curfile in $XFILES
82       do
83          mv ${curfile} ${curfile}.bin
84       done
85       md5sum  ${1}${5}${6}_${10}${13}${14}.* x* >md5sums.txt
86       sha512sum ${1}${5}${6}_${10}${13}${14}.* x* >sha512sums.txt
87       rm ${1}${5}${6}_${10}${13}${14}.files.tar.gz
88       #
89       #Emit the backup file MD5s to stdout so they go in the larger log.
90       echo "===== BACKUP FILE MD5 MESSAGE DIGESTS ====="
91       cat md5sums.txt
92       #
93       #Emit the backup file SHA512s to stdout so they go in the larger log.
94       echo "===== BACKUP FILE SHA512 MESSAGE DIGESTS ====="
95       cat sha512sums.txt
96       #
97       #Commented out because now deleting old before making new.  There will
98       #be only one directory.
99       #cd ..
100       #rm -fR `ls -1t | sed -e '2,$!d'`
101    fi
102    #
103    #Change to a safe working directory in case something goes wrong,
104    #especially a failed cd followed by a mass delete.
105    cd /root/cronjob_sandbox
106    #
107    #Make the sub-directory for svn repository backups.
108    mkdir /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/svn
109    #
110    #Make the sub-directory for svn repository backups of svn repository "dtapublic".
111    mkdir /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/svn/dtapublic
112    #
113    #Make MD5 message digests of everything in the repository "dtapublic".
114    find -L /hl/svnroots/dtapublic -type f -exec md5sum '{}' \; &>/hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/svn/dtapublic/${1}${5}${6}_${10}${13}${14}.files.md5sum.txt
115    #
116    #Make SHA512 message digests of everything in the repository "dtapublic".
117    find -L /hl/svnroots/dtapublic -type f -exec sha512sum '{}' \; &>/hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/svn/dtapublic/${1}${5}${6}_${10}${13}${14}.files.sha512sum.txt
118    #
119    #Tar up the svn repository, "dtapublic".
120    tar -c -v -z -h -f /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/svn/dtapublic/${1}${5}${6}_${10}${13}${14}.files.tar.gz /hl/svnroots/dtapublic &>/hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/svn/dtapublic/${1}${5}${6}_${10}${13}${14}.files.log.txt
121    #
122    #Emit the svn repository "dtapublic" backup file MD5s to stdout so they go in the larger log.
123    echo "===== FILE MD5 MESSAGE DIGESTS ====="
124    cat /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/svn/dtapublic/${1}${5}${6}_${10}${13}${14}.files.md5sum.txt
125    #
126    #Emit the svn repository "dtapublic" backup file SHA512s to stdout so they go in the larger log.
127    echo "===== FILE SHA512 MESSAGE DIGESTS ====="
128    cat /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/svn/dtapublic/${1}${5}${6}_${10}${13}${14}.files.sha512sum.txt
129    #
130    #Emit the svn repository "dtapublic" backup log files to stdout so they go in the larger log.
131    echo "===== FILES ====="
132    cat /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/svn/dtapublic/${1}${5}${6}_${10}${13}${14}.files.log.txt
133  #  #
134  #We want to be really careful with this next section because of  #We want to be really careful with this next section because of
135  #the recursive rm.  Want to be sure the directory exists.  #the recursive rm.  Want to be sure the directory exists.
136  if [ -d /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14} ] ; then  if [ -d /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/svn/dtapublic ] ; then
137     cd /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}     cd /hl/baks/ashley_david_personal_01/full_monthly/${1}${5}${6}_${10}${13}${14}/svn/dtapublic
138     split -b 1000m ${1}${5}${6}_${10}${13}${14}.files.tar.gz     split -b 1000m ${1}${5}${6}_${10}${13}${14}.files.tar.gz
139    
140     XFILES=`ls -1 x*`     XFILES=`ls -1 x*`
141     for curfile in $XFILES     for curfile in $XFILES
142     do     do

Legend:
Removed from v.136  
changed lines
  Added in v.137

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25