wip - only backup jira-export

merge-requests/1/merge
jem 3 years ago
parent 9ea8986342
commit e1ef688e5a

@ -4,8 +4,8 @@
* we use restic to produce small & encrypted backups
* backup is scheduled at `schedule: "10 23 * * *"`
* Jira stores files on `/var/jira`, these files are backuped. If you create a jira xml backup located in /var/jira this file will also be backed up.
* postgres db is backed up as pgdump
* Jira stores files on `/var/jira/export`, these files are backuped. By default jira produces two exports per day.
* As jira provides a full xml export postgres is not needed.
## Manual init the restic repository for the first time
@ -19,29 +19,31 @@
## Manual backup the restic repository for the first time
1. Scale Jira deployment down:
`kubectl scale deployment jira --replicas=0`
1.Create a jira export:
Jira > Settings > System -> Backup system
1. Choose a filename `backup-filename.xml`. Your file will be stored to `/var/backup/export`.
1. apply backup-and-restore pod:
`kubectl apply -f src/main/resources/backup/backup-restore.yaml`
1. exec into pod and execute restore pod
`kubectl exec -it backup-restore -- /usr/local/bin/backup.sh`
1. remove backup-and-restore pod:
`kubectl delete pod backup-restore`
1. Scale Jira deployment up:
`kubectl scale deployment jira --replicas=1`
## Manual restore
1. Scale Jira deployment down:
`kubectl scale deployment jira --replicas=0`
1. apply backup-and-restore pod:
`kubectl apply -f src/main/resources/backup/backup-restore.yaml`
1. exec into pod and execute restore pod
`kubectl exec -it backup-restore -- /usr/local/bin/restore.sh`
1. In case of already set up server:
1. Import one of Jira exportet backups:
Jira > Settings > System > Restore System
1. Choose one of your bakcuped files located at `/var/jira/restic-restore/export/`.
E.g. `/var/jira/restic-restore/export/backup-filename.xml`.
1. In case of installation wizzard:
1. Choose restore from backup
1. Choose one of your bakcuped files located at `/var/jira/restic-restore/export/`.
E.g. `/var/jira/restic-restore/export/backup-filename.xml`
1. remove backup-and-restore pod:
`kubectl delete pod backup-restore`
1. Scale Jira deployment up:
`kubectl scale deployment jira --replicas=1`
1. Update index of Jira:
Jira > Settings > System > Advanced > Indexing

@ -26,8 +26,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4"
inkscape:cx="401.60934"
inkscape:cy="468.05499"
inkscape:cx="266.60934"
inkscape:cy="465.19785"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
@ -61,15 +61,10 @@
y="214.22322"
id="text3897"><tspan
sodipodi:role="line"
id="tspan3895"
x="74.461304"
y="214.22322"
style="stroke-width:0.26458332">/var/jira</tspan><tspan
sodipodi:role="line"
x="74.461304"
y="219.51489"
style="stroke-width:0.26458332"
id="tspan3899">/var/postgres</tspan></text>
id="tspan3899">/var/jira</tspan></text>
<path
id="path3843"
d="m 23.928181,109.95955 c -0.03502,0.28187 -0.06495,0.56441 -0.105072,0.8456 -0.241563,1.69302 -0.514704,3.37966 -0.718689,5.07821 -0.224627,1.87044 -0.2236,2.05097 -0.387224,3.95474 -0.182611,3.20929 -0.396631,6.42977 -0.33565,9.64677 0.01463,0.77188 0.06165,1.54281 0.09247,2.31421 0.2865,4.13208 0.623369,8.26573 1.257784,12.36151 0.473742,3.05847 1.070569,6.05824 1.647011,9.09919 1.371342,7.38573 2.932193,14.74091 4.003443,22.17939 0.711486,4.94039 0.783532,6.24004 1.270172,11.18791 0.62489,7.91962 1.08907,15.86308 1.106733,23.80963 -0.08352,4.61198 -0.593383,9.2019 -0.930801,13.79934 -0.193958,3.15149 -0.256831,6.30687 -0.50723,9.45493 -0.191466,2.01724 -0.649743,3.99296 -1.26169,5.92065 -0.422531,1.31219 -1.134943,2.50065 -1.669743,3.76541 -0.02201,0.10972 -0.134403,0.3286 0.03627,0.41461 0.102896,0.0519 0.222845,0.0601 0.336483,0.0792 0.417455,0.07 0.836634,0.12944 1.255877,0.18775 1.872573,0.26047 3.305635,0.43219 5.224412,0.67266 9.134991,1.26831 18.356659,1.75044 27.564432,2.12585 4.020296,0.0609 8.049791,0.2484 12.07031,0.0726 1.16719,-0.051 2.572668,-0.17725 3.745476,-0.27392 2.929988,-0.26622 5.864217,-0.46476 8.802372,-0.61181 2.745777,-0.20556 5.492565,-0.3765 8.232034,-0.65588 1.80018,-0.12366 3.573132,-0.4627 5.367809,-0.62978 2.47194,-0.14926 4.95085,-0.13045 7.42637,-0.1494 1.49367,-0.009 2.98732,-0.0254 4.48103,-0.0248 2.29679,-0.0599 4.59581,-0.14828 6.89038,-0.27668 0.81386,-0.0997 1.68932,-0.0697 2.46058,-0.40019 0.12174,-0.0522 0.45801,-0.26514 0.33841,-0.20823 -0.77384,0.3683 -1.53526,0.76213 -2.3029,1.14319 0,0 2.51167,-1.2405 2.51167,-1.2405 v 0 c -0.79711,0.61588 -1.57648,1.25544 -2.39134,1.84764 -0.10539,0.0766 -0.23564,0.11344 -0.36009,0.15199 -0.78823,0.24415 -1.62793,0.23535 -2.44043,0.31034 -1.41196,0.0678 -2.82453,0.11789 -4.23623,0.19148 -0.17293,0.009 -1.91647,0.10988 -2.19401,0.11936 -0.17739,0.006 -0.35499,2.6e-4 -0.53249,5.3e-4 -1.47242,-0.004 -2.94479,-0.0239 -4.41725,-0.0192 -2.48349,0.007 -4.97162,0.005 -7.449094,0.19777 -1.777994,0.18636 -3.542387,0.48844 -5.328734,0.60062 -2.743859,0.25998 -5.492994,0.45303 -8.242266,0.64644 -2.925051,0.13255 -5.843926,0.35386 -8.762105,0.59232 -1.275369,0.0943 -2.432024,0.19257 -3.715295,0.23243 -3.976204,0.12353 -7.955569,-0.10992 -11.929526,-0.19412 -6.311511,-0.28924 -12.61361,-0.67269 -18.91022,-1.19841 -1.661732,-0.13874 -3.324495,-0.26742 -4.983742,-0.43325 -1.260668,-0.126 -2.516693,-0.29475 -3.775038,-0.44212 -1.010235,-0.11141 -2.020361,-0.22381 -3.030704,-0.33422 -0.776195,-0.0848 -1.553652,-0.15844 -2.328907,-0.25145 -0.358395,-0.043 -1.828279,0.006 -1.987163,-0.72851 -0.02454,-0.11344 0.02479,-0.2308 0.03718,-0.3462 0.529586,-1.27373 1.273345,-2.45184 1.71838,-3.76221 0.628139,-1.91168 1.102071,-3.87248 1.315069,-5.87713 0.281196,-3.15784 0.392117,-6.32368 0.578982,-9.4878 0.346115,-4.60085 0.895514,-9.19023 0.98575,-13.80717 0.117658,-7.97861 -0.22843,-15.9623 -0.844523,-23.91625 -0.478076,-4.94937 -0.54664,-6.24035 -1.250995,-11.18235 -1.058987,-7.43023 -2.624648,-14.77189 -4.077173,-22.13128 -0.371913,-1.88541 -1.410546,-7.07391 -1.745556,-9.06111 -0.687537,-4.0783 -1.054877,-8.20269 -1.384652,-12.32221 -0.04044,-0.77119 -0.0992,-1.54163 -0.121307,-2.31355 -0.0923,-3.22357 0.137938,-6.45038 0.325406,-9.6657 0.151052,-1.87677 0.152788,-2.11389 0.368253,-3.9587 0.226945,-1.9431 0.526741,-3.87837 0.708071,-5.82662 0,0 2.49922,-1.27341 2.49922,-1.27341 z"
@ -150,16 +145,6 @@
d="m 86.947041,125.7817 c 5.284819,0.22555 10.570421,0.42877 15.858099,0.57355 1.78635,0.10916 3.5911,-0.0218 5.3721,0.18996 0.415,0.0493 0.70451,0.11706 1.1035,0.19994 0.47456,0.18832 1.02456,0.1829 1.48017,0.42204 0.23318,0.12239 0.29224,0.21013 0.46889,0.39152 0.0504,0.0834 0.12362,0.15683 0.15132,0.25031 0.16054,0.54186 -0.0369,1.18359 -0.16114,1.70386 -0.0889,0.37233 -0.40365,1.58799 -0.48614,1.9086 -0.64307,2.33282 -1.04354,4.7138 -1.26108,7.12074 -0.15426,2.04713 -0.13376,4.10078 -0.2076,6.15119 0.007,1.32962 -0.12049,2.54741 -0.39619,3.8438 -0.32023,1.38543 -0.48611,2.79839 -0.59454,4.21414 -0.0767,0.64965 0.0209,1.37681 -0.25767,1.99155 -0.0439,0.0968 -0.11191,0.18072 -0.16786,0.27109 -2.51966,1.98133 -3.75158,2.11991 -6.53947,2.28631 -2.410197,0.11517 -4.819432,-0.10635 -7.222053,-0.27265 -0.767215,-0.0267 -1.527794,-0.10896 -2.285624,-0.22528 0,0 2.271609,-1.59845 2.271609,-1.59845 v 0 c 0.741993,0.11244 1.486681,0.19536 2.23687,0.23305 2.395603,0.17962 4.800908,0.39573 7.204228,0.23833 0.71464,-0.0543 1.19399,-0.0751 1.89255,-0.18502 0.25787,-0.0406 0.51515,-0.0879 0.76836,-0.15136 0.19939,-0.05 0.75232,-0.31085 0.58718,-0.18845 -0.99723,0.73917 -2.75674,1.57268 -1.49579,0.96392 0.0689,-0.0628 0.15271,-0.11253 0.20677,-0.18854 0.31807,-0.44727 0.2458,-1.4075 0.31087,-1.93129 0.12423,-1.42596 0.28572,-2.85186 0.5923,-4.25171 0.12036,-0.58224 0.25051,-1.16779 0.31548,-1.75982 0.0562,-0.51178 0.053,-0.79567 0.0765,-1.31868 0.0109,-0.24333 0.0243,-0.48653 0.0364,-0.72979 0.0903,-2.0584 0.0937,-4.11957 0.22766,-6.17604 0.0807,-0.93415 0.10478,-1.36811 0.2386,-2.29752 0.23583,-1.63795 0.61742,-3.2494 0.99635,-4.85857 0.25885,-1.05269 0.22449,-0.90335 0.4585,-1.88884 0.0798,-0.33626 0.3063,-1.12296 0.22387,-1.49443 -0.0161,-0.0726 -0.077,-0.12732 -0.11546,-0.19098 -0.49738,-0.47039 -1.21328,-0.49567 -1.84367,-0.69014 -2.07144,-0.43255 -4.20028,-0.33393 -6.30258,-0.45532 -5.315789,-0.20095 -10.631863,-0.41989 -15.950962,-0.50852 0,0 2.209703,-1.5925 2.209703,-1.5925 z"
inkscape:connector-curvature="0"
style="stroke-width:0.26458332" />
<path
id="path3875"
d="m 39.42045,171.8741 c -0.386061,3.07114 -0.825233,6.13534 -1.193122,9.20898 -0.325438,2.75157 -0.460682,5.51909 -0.517205,8.2876 -0.07618,1.33576 0.122145,2.66699 0.530346,3.93752 0.251127,0.59229 0.386845,0.54578 1.048401,0.583 0.442587,0.0249 0.885439,0.0462 1.328516,0.0599 0.73439,0.0226 1.469117,0.0325 2.203674,0.0487 0.99631,0.011 1.992564,0.0299 2.988932,0.033 1.667436,0.005 4.801145,-0.0262 6.470452,-0.048 1.08346,-0.0141 4.085306,-0.0541 5.283252,-0.11613 0.606796,-0.0314 1.211231,-0.0983 1.816847,-0.14752 0.383124,-0.09 0.766249,-0.18008 1.149373,-0.27012 0,0 -2.171319,1.64692 -2.171319,1.64692 v 0 c -0.374234,0.0682 -0.748466,0.13633 -1.122701,0.2045 -0.593473,0.0351 -1.186278,0.0845 -1.780421,0.10546 -1.044802,0.0368 -4.32322,0.0576 -5.220382,0.0661 -3.179358,0.03 -6.358723,0.0678 -9.538287,0.0652 -0.758175,-0.002 -1.51641,0.004 -2.274523,-0.006 -0.466423,-0.006 -0.933749,-0.005 -1.398757,-0.0419 -0.752882,-0.0596 -0.969369,-0.18472 -1.234966,-0.83876 -0.40009,-1.30923 -0.605938,-2.67916 -0.512268,-4.04945 0.07915,-2.78506 0.218033,-5.56834 0.555382,-8.33603 0.378595,-3.03989 0.809051,-6.07462 1.099066,-9.1246 0,0 2.48971,-1.26857 2.48971,-1.26857 z"
inkscape:connector-curvature="0"
style="stroke-width:0.26458332" />
<path
id="path3877"
d="m 41.127254,171.0983 c 5.502198,0.6054 11.022999,0.98873 16.548107,1.30717 1.769994,0.0896 3.08473,0.14105 4.816068,0.27928 0.783788,0.0626 2.59589,0.12526 3.235497,0.81271 0.149976,0.16119 0.1881,0.39815 0.282149,0.59722 -0.0058,0.28725 0.01892,0.57674 -0.0173,0.86176 -0.137467,1.08131 -0.633929,2.13435 -0.977966,3.15649 -0.409279,1.21599 -0.44527,1.37954 -0.802749,2.59214 -0.521033,1.85894 -0.765349,3.77645 -1.162063,5.66243 -0.0776,0.25012 -0.145298,0.50354 -0.232804,0.75037 -0.174321,0.49172 -0.402199,0.96322 -0.579366,1.45391 -0.271359,0.75157 -0.449863,1.51498 -0.612434,2.29541 0,0 -2.487181,1.20429 -2.487181,1.20429 v 0 c 0.160972,-0.7906 0.3293,-1.57549 0.594601,-2.3395 0.351806,-1.01315 0.210518,-0.45006 0.585753,-1.43782 0.09045,-0.2381 0.162351,-0.48285 0.243528,-0.72427 0.41207,-1.89958 0.691454,-3.82664 1.201462,-5.70447 0.307348,-1.04118 0.453091,-1.56165 0.792528,-2.60107 0.328207,-1.00503 0.787952,-2.01953 0.972253,-3.06702 0.04277,-0.24309 0.03952,-0.49205 0.05927,-0.73808 -0.06189,-0.15243 -0.07336,-0.33707 -0.185671,-0.45727 -0.579885,-0.62066 -2.361078,-0.71636 -3.054485,-0.78324 -1.752089,-0.16898 -2.91846,-0.225 -4.726493,-0.33904 -5.586902,-0.36182 -11.169819,-0.77655 -16.755512,-1.15302 0,0 2.262812,-1.62838 2.262812,-1.62838 z"
inkscape:connector-curvature="0"
style="stroke-width:0.26458332" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:6.3499999px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
@ -187,67 +172,6 @@
y="143.54167"
style="stroke-width:0.26458332"
id="tspan3887">pod</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:4.23333333px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
x="41.955357"
y="180.58334"
id="text3891"><tspan
sodipodi:role="line"
id="tspan3889"
x="41.955357"
y="180.58334"
style="stroke-width:0.26458332">postgres</tspan><tspan
sodipodi:role="line"
x="41.955357"
y="188.52084"
style="stroke-width:0.26458332"
id="tspan3893">pod</tspan></text>
<path
id="path3907"
d="m 52.944442,158.72263 c -0.494538,1.16082 -0.734864,2.40421 -0.908976,3.64743 -0.144328,1.19587 -0.152612,2.40227 -0.155803,3.6051 -0.0011,0.5429 0.0011,1.08579 0.0044,1.62868 0,0 -2.483165,1.26595 -2.483165,1.26595 v 0 c 0.0011,-0.54498 2.14e-4,-1.08995 0.0029,-1.63493 0.01069,-1.21331 -0.0028,-2.43073 0.139443,-3.63784 0.171741,-1.25572 0.411848,-2.50691 0.851694,-3.69971 0,0 2.549472,-1.17468 2.549472,-1.17468 z"
inkscape:connector-curvature="0"
style="stroke-width:0.26458332" />
<path
id="path3909"
d="m 48.702891,196.58962 c -0.983491,1.38136 -1.620311,2.94593 -2.079914,4.56733 -0.20266,0.86633 -0.362188,1.75156 -0.359669,2.64457 0.0011,0.39477 0.03945,0.70759 0.07655,1.09786 0.133447,0.70089 0.12818,1.57125 0.544298,2.18748 0.0759,0.11239 0.181306,0.20175 0.271957,0.30262 0.145984,0.10334 0.279003,0.22801 0.437952,0.31002 0.476173,0.24569 1.311666,0.45462 1.778269,0.57179 1.466292,0.3682 2.942921,0.61885 4.435962,0.84728 2.846943,0.39365 5.69304,0.79395 8.53716,1.20799 1.030647,0.15529 2.067353,0.23849 3.107126,0.29421 0,0 -2.232737,1.6009 -2.232737,1.6009 v 0 c -1.037595,-0.0746 -2.073079,-0.16892 -3.10208,-0.32668 -2.831767,-0.43649 -5.66892,-0.83888 -8.507153,-1.23063 -1.506183,-0.23508 -3.003103,-0.48864 -4.485291,-0.85044 -0.620178,-0.15138 -1.307746,-0.30904 -1.879489,-0.62406 -0.174649,-0.0962 -0.320207,-0.23772 -0.480309,-0.35659 -0.105394,-0.1223 -0.226369,-0.23274 -0.316185,-0.36689 -0.43444,-0.64893 -0.433845,-1.54238 -0.57804,-2.27942 -0.03598,-0.37414 -0.08011,-0.75709 -0.08497,-1.13331 -0.01183,-0.91532 0.141254,-1.82249 0.345377,-2.71159 0.447873,-1.62994 1.06616,-3.21228 2.008486,-4.62608 0,0 2.562694,-1.12636 2.562694,-1.12636 z"
inkscape:connector-curvature="0"
style="stroke-width:0.26458332" />
<path
id="path3911"
d="m 67.962922,208.49623 c 1.070838,0.31779 2.167284,0.54226 3.214373,0.93861 0.197241,0.0747 0.397279,0.14594 0.582877,0.2461 0.125605,0.0678 0.229637,0.16957 0.344458,0.25435 0.01669,0.12371 0.08987,0.25281 0.05009,0.37113 -0.04888,0.14537 -0.16351,0.27326 -0.293905,0.354 -0.928216,0.57473 -1.886839,1.10107 -2.85886,1.59814 -0.206107,0.1054 -0.440912,0.14168 -0.664032,0.20338 -0.717156,0.1983 -0.81847,0.20034 -1.564466,0.3399 -1.206381,0.11959 -2.377842,0.43781 -3.573502,0.61874 -0.447103,0.0779 -0.86301,0.25918 -1.280184,0.42923 0,0 2.194981,-1.72259 2.194981,-1.72259 v 0 c 0.430683,-0.15951 0.861899,-0.32128 1.320041,-0.38459 1.17993,-0.19528 2.348624,-0.4561 3.536698,-0.6044 0.660292,-0.13819 0.917766,-0.17416 1.553038,-0.37515 0.222552,-0.0704 0.846693,-0.37617 0.658627,-0.2379 -0.60353,0.44372 -1.297225,0.7514 -1.921076,1.16606 -0.110376,0.0734 0.256448,-0.0744 0.373182,-0.13719 0.04729,-0.0254 0.07108,-0.0805 0.106611,-0.12075 -0.497805,-0.36195 -0.972431,-0.50844 -1.562304,-0.6935 -0.832008,-0.26102 -1.685035,-0.4405 -2.523384,-0.67847 0,0 2.306741,-1.5651 2.306741,-1.5651 z"
inkscape:connector-curvature="0"
style="stroke-width:0.26458332" />
<path
id="path3913"
d="m 39.426155,195.73705 c 0.130109,1.74138 0.315502,3.4774 0.411678,5.22191 0.02657,2.29955 0.218123,4.5906 0.346969,6.8854 0.181595,2.14019 0.03349,4.27787 -0.127632,6.41272 -0.167685,2.00592 -0.548558,3.98491 -0.761238,5.98502 -1.43e-4,0.0239 -0.03462,0.7161 0.05031,0.83327 0.08978,0.12385 0.629618,0.0619 0.766376,0.0481 0.409287,-0.0413 1.421601,-0.21601 1.769012,-0.27324 3.044381,-0.61198 6.140601,-0.86782 9.236567,-1.02681 2.907319,-0.14732 5.818301,-0.15465 8.728422,-0.17088 2.001536,-0.0442 4.002434,-0.11204 6.00371,-0.1659 0.51657,-0.009 1.030671,-0.0181 1.545387,-0.0615 0,0 -2.249906,1.65733 -2.249906,1.65733 v 0 c -0.509751,0.0241 -1.019328,0.0303 -1.529659,0.0352 -1.98863,0.0367 -3.976619,0.0997 -5.965323,0.13113 -2.895195,-10e-4 -5.791366,0.0239 -8.684,0.15555 -3.110183,0.17656 -6.218859,0.45175 -9.273397,1.09096 -0.592434,0.0975 -2.393484,0.57517 -2.8227,-0.10631 -0.09725,-0.1544 -0.05146,-0.83294 -0.04986,-0.92063 0.23949,-1.99988 0.613863,-3.98168 0.793954,-5.98933 0.152844,-2.12428 0.324363,-4.25145 0.143322,-6.38112 -0.126492,-2.29393 -0.30217,-4.58494 -0.351922,-6.8825 -0.101545,-1.74025 -0.254855,-3.47516 -0.481187,-5.20391 0,0 2.501122,-1.27438 2.501122,-1.27438 z"
inkscape:connector-curvature="0"
style="stroke-width:0.26458332" />
<path
id="path3915"
d="m 66.072366,216.95851 c 0.159356,0.069 0.31765,0.1405 0.47807,0.20698 0.56293,0.2333 0.612868,0.25391 1.231924,0.41939 0.341617,0.0913 0.903883,0.17795 1.224502,0.38031 0.109281,0.069 0.172664,0.19232 0.258998,0.28847 -0.02923,0.15056 -0.0055,0.32217 -0.0877,0.45168 -0.102698,0.16184 -0.272053,0.27585 -0.436468,0.37439 -0.992952,0.59509 -2.007229,1.15454 -3.027447,1.70157 -0.833075,0.44669 -1.7858,0.70879 -2.675686,1.01244 -0.305697,0.10363 -0.611394,0.20726 -0.917094,0.31088 0,0 2.165753,-1.68434 2.165753,-1.68434 v 0 c 0.304175,-0.10313 0.608353,-0.20626 0.912529,-0.30939 0.62801,-0.21987 1.247357,-0.42545 1.861008,-0.68377 0.27492,-0.11573 1.052922,-0.55116 0.812953,-0.37399 -2.543275,1.87773 -2.042072,1.11792 -1.007078,0.65271 -0.05659,-0.0634 -0.09585,-0.14825 -0.169759,-0.19019 -0.312222,-0.17717 -0.882116,-0.28123 -1.199301,-0.36981 -0.602935,-0.16838 -1.18201,-0.38839 -1.759529,-0.62828 0,0 2.334326,-1.55905 2.334326,-1.55905 z"
inkscape:connector-curvature="0"
style="stroke-width:0.26458332" />
<path
id="path3917"
d="m 51.503606,167.96544 c -0.08266,0.89345 -0.109286,1.78994 -0.201771,2.68247 -0.01302,0.12242 -0.02604,0.24483 -0.03904,0.36725 0,0 -2.508607,1.24347 -2.508607,1.24347 v 0 c 0.01418,-0.12277 0.02838,-0.24555 0.04257,-0.36833 0.101182,-0.88755 0.144767,-1.778 0.196094,-2.66975 0,0 2.510758,-1.25511 2.510758,-1.25511 z"
inkscape:connector-curvature="0"
style="stroke-width:0.26458332" />
<path
id="path3919"
d="m 45.447285,198.11493 c 0.01156,-0.12851 0.02313,-0.25702 0.03471,-0.38552 0,0 2.503757,-1.2502 2.503757,-1.2502 v 0 c -0.0092,0.12687 -0.01847,0.25374 -0.0277,0.38061 0,0 -2.510759,1.25511 -2.510759,1.25511 z"
inkscape:connector-curvature="0"
style="stroke-width:0.26458332" />
<path
id="path3921"
d="m 64.059876,171.53602 c 1.900489,-1.71523 3.942122,-3.26578 5.944502,-4.85871 1.85697,-1.49953 3.883628,-2.7665 5.94346,-3.96428 1.576517,-0.98722 3.241336,-1.80545 4.884642,-2.66746 0,0 -2.147583,1.72401 -2.147583,1.72401 v 0 c -0.665753,0.34578 -3.396488,1.79756 -0.192357,-0.0335 -2.067388,1.18774 -4.103844,2.44352 -5.971104,3.93239 -1.985666,1.5694 -4.009927,3.0999 -5.879319,4.80838 0,0 -2.582241,1.05918 -2.582241,1.05918 z"
inkscape:connector-curvature="0"
style="stroke-width:0.26458332" />
<path
id="path3923"
d="m 77.394656,160.5203 c 1.71513,-0.51237 3.402428,-1.10991 5.106115,-1.65813 0.731046,-0.20514 1.445453,-0.47607 2.192218,-0.61835 0.104561,-0.0199 0.20833,-0.0604 0.314616,-0.0546 0.07719,0.004 0.14428,0.0555 0.216419,0.0833 0.03782,0.12287 0.115371,0.24007 0.113466,0.36862 -0.0043,0.28902 -0.259276,0.78355 -0.381381,1.01141 -0.3425,0.63913 -0.75638,1.23516 -1.172686,1.82705 -0.133842,0.17621 -0.267687,0.35242 -0.401532,0.52864 0,0 -2.54744,1.09328 -2.54744,1.09328 v 0 c 0.136983,-0.17389 0.273966,-0.34778 0.410946,-0.52168 0.421023,-0.57643 0.823592,-1.16024 1.177112,-1.78149 0.716511,-1.25915 -0.09667,0.13344 0.422593,-0.85095 0.01468,-0.0278 0.04181,-0.047 0.06272,-0.0706 -0.855752,0.009 -1.756891,0.50569 -2.587709,0.67547 -1.716987,0.54835 -3.422219,1.13217 -5.135367,1.69243 0,0 2.209911,-1.72442 2.209911,-1.72442 z"
inkscape:connector-curvature="0"
style="stroke-width:0.26458332" />
<path
id="path3925"
d="m 91.683138,212.09182 c 1.137703,-1.27556 2.22654,-2.5865 3.263471,-3.9453 0.205557,-0.29666 0.41461,-0.59094 0.616672,-0.88999 0.201801,-0.29867 0.410565,-0.59327 0.594834,-0.90306 0.767257,-1.28989 1.24637,-2.68889 1.649878,-4.12529 0.522272,-2.45874 -0.09514,-4.92399 -0.664305,-7.31516 -0.480769,-1.80394 -1.205447,-3.52772 -1.834835,-5.28175 -0.298577,-0.8321 -0.5046,-1.46266 -0.781976,-2.29274 -0.695264,-2.33261 -0.985563,-4.7562 -1.379644,-7.1512 -0.210613,-1.35997 -0.401425,-2.72626 -0.525383,-4.09719 -0.104293,-1.69462 -0.09761,-3.39385 -0.106246,-5.09099 -0.0078,-0.97578 -0.01262,-1.95157 -0.01765,-2.92736 0,0 2.474648,-1.26073 2.474648,-1.26073 v 0 c -0.006,0.98012 -0.01124,1.96025 -0.0113,2.94039 0.0083,1.68507 0.0096,3.37227 0.125936,5.05414 0.125944,1.37044 0.28489,2.73904 0.477658,4.10158 0.364437,2.38643 0.652237,4.7988 1.351819,7.11689 0.817494,2.55338 1.826959,5.03793 2.613068,7.6012 0.501657,2.05518 1.054037,4.2044 0.903427,6.33968 -0.0258,0.36576 -0.10537,0.72574 -0.15806,1.08861 -0.392003,1.44997 -0.858281,2.89413 -1.614436,4.20269 -0.180864,0.31299 -0.392888,0.60693 -0.592895,0.90804 -0.200612,0.30204 -0.405952,0.60091 -0.60893,0.90137 -1.017805,1.34721 -2.073376,2.65982 -3.194034,3.92315 0,0 -2.581733,1.10302 -2.581733,1.10302 z"
@ -290,5 +214,46 @@
y="196.45834"
style="stroke-width:0.26458332"
id="tspan3958">with folder /jira</tspan></text>
<path
id="path4567"
d="m 47.54931,158.6572 c 0.383148,2.22848 0.46187,4.49111 0.552379,6.74562 0.18756,3.2489 0.52107,6.48498 0.682984,9.7356 0.149458,2.68499 0.148924,5.3751 0.149784,8.0633 0.0019,2.8749 -0.0046,5.74978 0.0034,8.62467 0.03755,2.1233 -0.163541,4.23507 -0.346138,6.34708 -0.149477,1.61858 -0.363313,3.23216 -0.647012,4.83268 -0.234302,1.22668 -0.421923,2.46187 -0.547799,3.70433 -0.08979,0.98314 -0.142047,1.97043 0.0039,2.94948 0.186934,1.01281 0.481555,1.62972 1.420681,2.15714 0.230214,0.1293 0.47943,0.22138 0.719145,0.33207 0.244293,0.0869 0.483042,0.19135 0.732875,0.26074 0.633949,0.17609 1.329594,0.25856 1.979027,0.32245 1.241132,0.12208 2.488036,0.14868 3.733721,0.18141 2.501196,0.0392 5.001728,0.10871 7.503025,0.14437 1.19952,0.0221 2.399202,0.027 3.598886,0.0261 0,0 -3.129587,2.27104 -3.129587,2.27104 v 0 c -1.193453,-0.0147 -2.38697,-0.0253 -3.580333,-0.0465 -2.489735,-0.0659 -4.97921,-0.14971 -7.469873,-0.17158 -1.259324,-0.0354 -2.519532,-0.0673 -3.773551,-0.19941 -0.738166,-0.0778 -1.361051,-0.15362 -2.066454,-0.36981 -0.25623,-0.0785 -0.499298,-0.1949 -0.748945,-0.29235 -0.254273,-0.12697 -0.519486,-0.23405 -0.762815,-0.38091 -1.005287,-0.60671 -1.38525,-1.29363 -1.60909,-2.40386 -0.179417,-1.00764 -0.125558,-2.03159 -0.03612,-3.04754 0.121407,-1.25541 0.308419,-2.50479 0.548399,-3.74284 0.319148,-1.58627 0.525431,-3.19576 0.677773,-4.80606 0.198826,-2.1124 0.459552,-4.22064 0.423312,-6.34767 0.0118,-2.87613 0.01273,-5.75229 0.0069,-8.62845 -0.0149,-2.6847 -0.03114,-5.36989 -0.13204,-8.05305 -0.153803,-3.25094 -0.430568,-6.49245 -0.680255,-9.73704 -0.125624,-2.20739 -0.190545,-4.43755 -0.65379,-6.60667 0,0 3.447534,-1.86436 3.447534,-1.86436 z"
inkscape:connector-curvature="0"
style="stroke-width:0.26458332" />
<path
id="path4569"
d="m 66.731803,209.39296 c 0.787426,0.15153 1.555366,0.38479 2.339842,0.54876 0.386474,0.11573 0.762633,0.23452 1.109644,0.44253 0.479846,0.3102 0.614572,0.85105 0.335873,1.36676 -0.104804,0.19393 -0.259548,0.35638 -0.389321,0.53457 -0.858851,0.93191 -1.746121,1.84346 -2.690675,2.68933 -1.375191,1.18338 -3.039372,1.99187 -4.684559,2.74226 0,0 3.040589,-2.42555 3.040589,-2.42555 v 0 c 2.411142,-1.23328 -3.868417,2.43666 -1.972995,1.15251 0.966118,-0.81943 1.850964,-1.72762 2.731891,-2.63725 0.156784,-0.16582 0.693947,-0.60719 0.660948,-0.92917 -0.01625,-0.15847 -0.222724,-0.26544 -0.336439,-0.33478 -0.330967,-0.15822 -0.679307,-0.27084 -1.034156,-0.36372 -0.778398,-0.19161 -1.549238,-0.41417 -2.340652,-0.54963 0,0 3.23001,-2.23662 3.23001,-2.23662 z"
inkscape:connector-curvature="0"
style="stroke-width:0.26458332" />
<path
id="path4573"
d="m 111.80405,151.39654 c 0.39423,1.72637 0.66392,3.48393 0.87708,5.24156 0.27092,2.65243 0.27099,5.32127 0.31238,7.98419 0.0907,2.47436 -0.0827,4.94403 -0.19941,7.414 -0.0914,1.90031 -0.11222,3.80288 -0.13508,5.70493 -0.005,1.08691 -0.0689,2.18725 0.18712,3.25466 0.14688,0.61224 0.26326,0.80942 0.51451,1.38599 0.8503,1.42996 2.13949,2.53233 3.52822,3.41891 0.91235,0.54976 1.88871,0.86139 2.9408,0.97232 0.14669,0.009 0.29339,0.0187 0.44009,0.028 0,0 -3.18167,2.27218 -3.18167,2.27218 v 0 c -0.14942,-0.0149 -0.29885,-0.0298 -0.44828,-0.0447 -1.08253,-0.1645 -2.08274,-0.54401 -3.00681,-1.14093 -1.42099,-0.96745 -2.75243,-2.1177 -3.64192,-3.60898 -0.27204,-0.61177 -0.39454,-0.81526 -0.55733,-1.46635 -0.27297,-1.09181 -0.2205,-2.21054 -0.20993,-3.32469 0.0113,-1.91341 0.0731,-3.82557 0.16404,-5.73686 0.12632,-2.467 0.30158,-4.93356 0.23324,-7.40556 -0.0166,-2.64498 -0.0543,-5.29551 -0.32647,-7.92875 -0.21783,-1.72281 -0.46802,-3.45922 -0.93569,-5.13302 0,0 3.44511,-1.88694 3.44511,-1.88694 z"
inkscape:connector-curvature="0"
style="stroke-width:0.26458332" />
<path
id="path4575"
d="m 120.26118,183.25451 c 1.03558,0.44812 2.08462,0.86712 3.10811,1.34254 0.66744,0.27885 1.10625,0.55091 1.23354,1.29208 -0.0155,0.10028 -0.0121,0.20535 -0.0464,0.30084 -0.2179,0.60649 -1.20741,1.40269 -1.68377,1.82615 -0.37046,0.29797 -0.6676,0.67891 -1.02936,0.98575 -1.26698,1.07462 -2.85284,1.71261 -4.35016,2.43239 -0.25915,0.12457 -0.56322,0.1162 -0.84483,0.1743 0,0 3.0639,-2.33801 3.0639,-2.33801 v 0 c 1.89017,-0.51573 1.02022,-0.36257 -1.90016,1.45201 -0.13383,0.0832 0.28258,-0.14234 0.41065,-0.23413 0.13514,-0.0969 0.55323,-0.52734 0.65391,-0.62593 0.1299,-0.12719 0.26187,-0.25225 0.3928,-0.37838 0.63671,-0.56717 1.29494,-1.11468 1.83723,-1.77768 0.0396,-0.56234 -0.5789,-0.74654 -0.99538,-0.95269 -1.0279,-0.47988 -2.07305,-0.92261 -3.12635,-1.34356 0,0 3.27629,-2.15568 3.27629,-2.15568 z"
inkscape:connector-curvature="0"
style="stroke-width:0.26458332" />
<path
id="path4581"
d="m 41.026003,218.39804 c -0.196043,0.90236 -0.30293,1.82299 -0.484214,2.7276 -0.126053,0.62899 -0.357659,1.47727 -0.517967,2.09125 -0.588407,2.05563 -1.027441,4.14782 -1.53819,6.22265 -0.392927,1.60684 -0.877186,3.19101 -1.371713,4.76931 -0.36009,1.22742 -0.551003,2.5 -0.745816,3.76272 -0.07581,0.53809 -0.130521,1.07887 -0.167248,1.62098 -0.0075,0.1109 -0.05089,0.60541 -0.0043,0.75088 0.02244,0.0701 0.09203,0.11489 0.138054,0.17233 0.133816,0.0345 0.265536,0.0785 0.401447,0.10357 0.580549,0.10692 1.180325,0.15444 1.767539,0.18972 1.327592,0.0798 2.658377,0.0843 3.987736,0.10081 2.647278,-0.0441 5.287129,-0.25775 7.933224,-0.33083 2.365711,-0.0525 4.731967,-0.0628 7.098078,-0.0831 0.69524,0.0268 1.394899,-0.048 2.090007,-0.0156 0.594746,0.0277 1.182251,0.12676 1.763493,0.24741 0.705646,0.0915 1.51792,0.51423 2.228943,0.35473 1.167593,-0.43308 3.717004,-2.06993 -2.93093,1.70073 -0.0382,0.0217 0.07836,-0.0415 0.111056,-0.0709 0.105442,-0.0946 0.102746,-0.16697 0.149386,-0.30825 0.15997,-1.22284 0.01691,-2.45808 -0.06054,-3.68179 -0.142843,-1.82336 -0.178292,-3.65186 -0.206972,-5.47976 -0.08942,-1.4835 0.01704,-2.90329 0.309147,-4.3569 0.329477,-1.22724 0.653639,-2.46424 1.141653,-3.63973 0.332351,-0.67076 0.658177,-1.34069 0.845254,-2.06777 0.116691,-0.52852 0.113487,-1.07235 0.117718,-1.61065 -0.0016,-0.0239 -0.02551,-0.44533 -0.04633,-0.47529 -0.03617,-0.052 -0.115961,-0.0529 -0.177498,-0.0679 -0.168847,-0.0413 -0.34,-0.0734 -0.511665,-0.1007 -0.672182,-0.10697 -0.916672,-0.11585 -1.607621,-0.17693 -2.007188,-0.13037 -4.019778,-0.11245 -6.030029,-0.11457 -1.846916,0.009 -3.693832,0.0112 -5.540761,0.007 -2.277737,-0.004 -4.55553,-0.008 -6.833256,0.002 -1.352209,0.0338 -2.707648,-0.0259 -4.058492,0.0493 -0.154074,0.0226 -0.308149,0.0451 -0.462224,0.0677 0,0 3.133847,-2.33224 3.133847,-2.33224 v 0 c 0.157371,-0.0133 0.314745,-0.0266 0.472117,-0.0399 1.337167,-0.0389 2.675461,0.009 4.012978,0.004 2.278329,0.009 4.556736,0.005 6.83506,-0.003 1.84894,-0.009 3.697907,-0.0159 5.546871,-0.0102 2.021533,0.003 4.046122,0.005 6.064125,0.13391 0.712544,0.071 2.196976,0.0705 2.639756,0.74774 0.01492,0.0228 0.06469,0.52093 0.06531,0.5267 0.0013,0.56383 0.01021,1.13111 -0.07633,1.69 -0.162393,0.76005 -0.462552,1.46846 -0.842615,2.14606 -0.531678,1.14307 -0.856301,2.3664 -1.197298,3.57695 -0.315841,1.43798 -0.442791,2.81913 -0.374285,4.29398 0.0217,1.82153 0.06557,3.64331 0.196607,5.46078 0.0955,1.23978 0.262665,2.47777 0.180832,3.72342 -0.09023,1.82669 -2.297512,2.57516 -4.035079,2.74412 -0.766791,-0.0474 -1.494581,-0.33404 -2.248511,-0.464 -1.248807,-0.21144 -2.506273,-0.21467 -3.770627,-0.20095 -2.355453,-0.007 -4.711428,0.004 -7.066002,0.0737 -2.640179,0.0976 -5.278615,0.24452 -7.920167,0.30119 -1.346634,-0.0119 -2.697374,-0.0169 -4.042347,-0.0949 -0.470196,-0.0273 -1.403635,-0.089 -1.893567,-0.24547 -0.193196,-0.0617 -0.360397,-0.18613 -0.540597,-0.27919 -0.07901,-0.11932 -0.187248,-0.22379 -0.237032,-0.35795 -0.07029,-0.18943 -0.01939,-0.63801 -0.0061,-0.8153 0.04138,-0.55234 0.09136,-1.10449 0.171498,-1.65275 0.09035,-0.63162 0.213423,-1.25336 0.319759,-1.88204 0.11031,-0.65219 0.1826,-1.31341 0.40757,-1.94091 0.509455,-1.57672 1.004826,-3.15982 1.418452,-4.76437 0.524632,-2.07527 0.957683,-4.17278 1.549016,-6.23158 0.06891,-0.26851 0.449774,-1.73215 0.51035,-2.04422 0.172646,-0.88946 0.232836,-1.80164 0.416105,-2.68994 0,0 3.523382,-1.73273 3.523382,-1.73273 z"
inkscape:connector-curvature="0"
style="stroke-width:0.26458332;fill:#9d9d9d;fill-opacity:1" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:6.3499999px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill-opacity:1;stroke:none;stroke-width:0.26458332"
x="40.82143"
y="227.64137"
id="text4585"><tspan
sodipodi:role="line"
id="tspan4583"
x="40.82143"
y="227.64137"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332">postgres</tspan><tspan
sodipodi:role="line"
x="40.82143"
y="235.57887"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332"
id="tspan4587">-pod</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 41 KiB

@ -5,18 +5,13 @@ set -o pipefail
function main() {
file_env AWS_ACCESS_KEY_ID
file_env AWS_SECRET_ACCESS_KEY
file_env POSTGRES_DB
file_env POSTGRES_PASSWORD
file_env POSTGRES_USER
file_env RESTIC_DAYS_TO_KEEP 14
backup-roles ""
backup-db-dump
backup-fs-from-directory '/var/backups/' 'data/'
}
source /usr/local/lib/functions.sh
source /usr/local/lib/file-functions.sh
source /usr/local/lib/pg-functions.sh
main

@ -1,11 +1,6 @@
#!/bin/bash
function main() {
file_env POSTGRES_DB
file_env POSTGRES_PASSWORD
file_env POSTGRES_USER
create-pg-pass
while true; do
sleep 1m
@ -13,5 +8,4 @@ function main() {
}
source /usr/local/lib/functions.sh
source /usr/local/lib/pg-functions.sh
main

@ -1,15 +1,9 @@
#!/bin/bash
function main() {
file_env POSTGRES_DB
file_env POSTGRES_PASSWORD
file_env POSTGRES_USER
create-pg-pass
/usr/local/bin/backup.sh
}
source /usr/local/lib/functions.sh
source /usr/local/lib/pg-functions.sh
main

@ -4,12 +4,9 @@ function main() {
file_env AWS_ACCESS_KEY_ID
file_env AWS_SECRET_ACCESS_KEY
init-role-repo
init-database-repo
init-file-repo
}
source /usr/local/lib/functions.sh
source /usr/local/lib/file-functions.sh
source /usr/local/lib/pg-functions.sh
main

@ -6,8 +6,6 @@ function main() {
file_env AWS_ACCESS_KEY_ID
file_env AWS_SECRET_ACCESS_KEY
restic -r ${RESTIC_REPOSITORY}/pg-role snapshots
restic -r ${RESTIC_REPOSITORY}/pg-database snapshots
restic -r ${RESTIC_REPOSITORY}/files snapshots
}

@ -7,12 +7,6 @@ function main() {
file_env AWS_ACCESS_KEY_ID
file_env AWS_SECRET_ACCESS_KEY
file_env POSTGRES_DB
file_env POSTGRES_PASSWORD
file_env POSTGRES_USER
# Im Jira pod: /opt/atlassian-jira-software-standalone/bin/stop-jira.sh
# Restore latest snapshot into /var/backups/restic-restore
rm -rf /var/backups/restic-restore
restore-directory '/var/backups/restic-restore'
@ -21,16 +15,10 @@ function main() {
rm -rf /var/backups/data/*
cp -a /var/backups/restic-restore/data/* /var/backups/data
# Restore db
drop-create-db
restore-roles
restore-db
# /opt/atlassian-jira-software-standalone/bin/start-jira.sh
}
source /usr/local/lib/functions.sh
source /usr/local/lib/file-functions.sh
source /usr/local/lib/pg-functions.sh
main

@ -12,27 +12,6 @@ spec:
imagePullPolicy: IfNotPresent
command: ["/entrypoint-start-and-wait.sh"]
env:
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: postgres-secret
key: postgres-user
- name: POSTGRES_DB
valueFrom:
configMapKeyRef:
name: postgres-config
key: postgres-db
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: postgres-secret
key: postgres-password
- name: POSTGRES_HOST
value: "postgresql-service:5432"
- name: POSTGRES_SERVICE
value: "postgresql-service"
- name: POSTGRES_PORT
value: "5432"
- name: AWS_DEFAULT_REGION
value: eu-central-1
- name: AWS_ACCESS_KEY_ID_FILE

@ -18,27 +18,6 @@ spec:
imagePullPolicy: IfNotPresent
command: ["/entrypoint.sh"]
env:
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: postgres-secret
key: postgres-user
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: postgres-secret
key: postgres-password
- name: POSTGRES_DB
valueFrom:
configMapKeyRef:
name: postgres-config
key: postgres-db
- name: POSTGRES_HOST
value: "postgresql-service:5432"
- name: POSTGRES_SERVICE
value: "postgresql-service"
- name: POSTGRES_PORT
value: "5432"
- name: AWS_DEFAULT_REGION
value: eu-central-1
- name: AWS_ACCESS_KEY_ID_FILE