Micke Nordin
|
54de0adb0f
|
Remove replicate readwrite db
|
2023-07-18 15:52:33 +02:00 |
|
Micke Nordin
|
1152fd972f
|
Add 'gss.username_format' => 'sanitize',
|
2023-07-06 14:50:47 +02:00 |
|
Micke Nordin
|
befc3207d9
|
Fix conficting bashrc declarations
|
2023-06-15 19:24:31 +02:00 |
|
Micke Nordin
|
1e23d134f1
|
Add fqdn to PS1
|
2023-06-13 14:15:53 +02:00 |
|
Micke Nordin
|
e0139b0765
|
BAckups: Fix db backups
DB backup dir clashed with statistics script storage location, and also
some permission errors.
diff --git a/templates/script/backupdb.erb.sh b/templates/script/backupdb.erb.sh
index b35acbc..1eb7992 100644
--- a/templates/script/backupdb.erb.sh
+++ b/templates/script/backupdb.erb.sh
@@ -6,11 +6,16 @@ sleep $((16#$(ip a | grep "link/ether" | head -1 | awk -F ':' '{print $6}' | awk
number_of_full_to_keep="<%= @full_backup_retention %>"
backup="${1}"
+if [[ -z ${backup} ]]; then
+ backup="backup1.$(hostname -d)"
+fi
if ! [[ ${backup} =~ backup1.*sunet.se$ ]]; then
echo "Usage: ${0} <fqdn of backup server>"
echo "Example: ${0} backup1.sunet.drive.sunet.se"
fi
backup_dir="/opt/backups"
+backup_dir_long="${backup_dir}/backups"
+mkdir -p ${backup_dir}
bucket="db-backups"
mirror="<%= @customer %>-<%= @environment %>-mirror"
if [[ ${mirror} =~ common-(test|prod)-mirror ]]; then
@@ -23,11 +28,8 @@ ssh ${backup} "sudo /home/script/bin/backup_db.sh"
echo "Cleaning up old backups for ${backup}"
ssh ${backup} "sudo /home/script/bin/purge_backups.sh /opt/mariadb_backup/backups/"
echo "Copying backups here"
-mkdir -p ${backup_dir}
-scp script@${backup}:/opt/mariadb_backup/backups/$(date +%Y/%m/%d)/*.gz ${backup_dir}
+scp script@${backup}:/opt/mariadb_backup/backups/$(date +%Y/%m/%d)/*.gz ${backup_dir_long}
echo "Copying backups to remote bucket"
rclone mkdir ${mirror}:${bucket}
duplicity --full-if-older-than 1M --tempdir /mnt --archive-dir /mnt --no-encryption ${backup_dir} rclone://${mirror}:/${bucket}
duplicity remove-all-but-n-full ${number_of_full_to_keep} --tempdir /mnt --archive-dir /mnt --force rclone://${mirror}:/${bucket}
-echo "cleaning up"
-rm -r ${backup_dir}
diff --git a/templates/scriptreceiver/backup_db.erb.sh b/templates/scriptreceiver/backup_db.erb.sh
index 025a338..3e15f25 100644
--- a/templates/scriptreceiver/backup_db.erb.sh
+++ b/templates/scriptreceiver/backup_db.erb.sh
@@ -11,5 +11,7 @@ else
fi
docker exec ${container} /do_backup.sh ${customer}
+chown root:script /opt/mariadb_backup/
+chmod 750 /opt/mariadb_backup/
chmod 755 ${backupdir}
chown -R script:root ${backupdir}
|
2023-06-13 12:15:19 +02:00 |
|
Micke Nordin
|
0f8f27773b
|
Add support for replicating from multinode dbs
|
2023-06-12 09:31:41 +02:00 |
|
Micke Nordin
|
e7ffd6fac3
|
Add nordu.net
|
2023-06-08 16:43:05 +02:00 |
|
Micke Nordin
|
3531be828e
|
Add nordu.net
|
2023-06-08 16:32:43 +02:00 |
|
Micke Nordin
|
24b0b1eedc
|
Revert "Use nce image"
This reverts commit 20471ebaa8 .
|
2023-06-01 11:47:16 +02:00 |
|
Micke Nordin
|
20471ebaa8
|
Use nce image
|
2023-06-01 11:44:50 +02:00 |
|
Fredrik Kjellman
|
3dab127050
|
Merge branch 'main' into stable
|
2023-05-08 09:15:12 +02:00 |
|
Fredrik Kjellman
|
fc4b51b4ac
|
update mapping file to fix problems for shh.se
|
2023-05-08 09:14:00 +02:00 |
|
Fredrik Kjellman
|
a14a71f5d6
|
Merge branch 'main' into stable
|
2023-05-03 15:32:38 +02:00 |
|
Fredrik Kjellman
|
52c11917ce
|
modify mappingfile for GSS to help SHH to login.
|
2023-05-03 15:00:24 +02:00 |
|
Micke Nordin
|
ca2cf7e3f2
|
Allow file locks to be debug logged for sunet test
|
2023-04-27 16:44:06 +02:00 |
|
Micke Nordin
|
75f75732e7
|
Fix repair command
|
2023-04-26 11:22:25 +02:00 |
|
Micke Nordin
|
8ca66c10ad
|
Add more repair commands and use tty for occ
|
2023-04-26 09:26:46 +02:00 |
|
Micke Nordin
|
7d10d168bd
|
Fix nc_upgrade_command
|
2023-04-25 17:48:13 +02:00 |
|
Micke Nordin
|
036dcf010c
|
Add gss
|
2023-04-24 16:39:09 +02:00 |
|
Micke Nordin
|
3b5d14a189
|
Try again
|
2023-04-24 16:34:37 +02:00 |
|
Micke Nordin
|
e840903eae
|
Can I force string
|
2023-04-24 16:30:12 +02:00 |
|
Micke Nordin
|
db516e3b72
|
New name
|
2023-04-24 16:27:21 +02:00 |
|
Micke Nordin
|
a9695aeee1
|
Two passes
|
2023-04-24 16:25:37 +02:00 |
|
Micke Nordin
|
713f12e1d4
|
Terminate regex
|
2023-04-24 16:23:01 +02:00 |
|
Micke Nordin
|
568cb87ad6
|
Trim version
|
2023-04-24 16:21:22 +02:00 |
|
Micke Nordin
|
709d2165ac
|
Gsub
|
2023-04-24 16:13:11 +02:00 |
|
Micke Nordin
|
37e419cf75
|
Try regsubst
|
2023-04-24 16:06:55 +02:00 |
|
Micke Nordin
|
54868e8518
|
Yet another try
|
2023-04-24 15:59:47 +02:00 |
|
Micke Nordin
|
20d1558866
|
Yet another try
|
2023-04-24 15:56:22 +02:00 |
|
Micke Nordin
|
f1276d52d3
|
Fingers crossed
|
2023-04-24 15:51:49 +02:00 |
|
Micke Nordin
|
9b44a99135
|
Print debug to file
|
2023-04-24 15:47:56 +02:00 |
|
Micke Nordin
|
9ec76cfc7f
|
Yet another try
|
2023-04-24 15:39:32 +02:00 |
|
Micke Nordin
|
71fd8a3287
|
Yet another try
|
2023-04-24 15:34:02 +02:00 |
|
Micke Nordin
|
f95675f6ee
|
Yet another try
|
2023-04-24 15:27:51 +02:00 |
|
Micke Nordin
|
e06b7ffb1c
|
Try to lookup fact yet another way
|
2023-04-24 15:23:57 +02:00 |
|
Micke Nordin
|
1045898d40
|
Diffent fact syntax
|
2023-04-24 15:13:10 +02:00 |
|
Micke Nordin
|
4af4a23d1b
|
Use new facts in template
|
2023-04-24 15:06:51 +02:00 |
|
Micke Nordin
|
c5e5279f0e
|
Add reference to self
|
2023-04-24 12:10:30 +02:00 |
|
Micke Nordin
|
165415b725
|
Less dangerous pruning script
|
2023-04-24 10:47:36 +02:00 |
|
Micke Nordin
|
f2f919a59c
|
Lower further
|
2023-04-05 14:20:52 +02:00 |
|
Micke Nordin
|
801c5a2e85
|
Lower interned string value
|
2023-04-05 14:13:00 +02:00 |
|
Micke Nordin
|
4948ada609
|
Use facter
|
2023-04-05 12:26:11 +02:00 |
|
Micke Nordin
|
e220a1b1c6
|
Fix htaccess complaint
|
2023-04-05 08:55:41 +02:00 |
|
Micke Nordin
|
bf5e5adf10
|
Apache would not start with 128mb
|
2023-04-05 08:27:53 +02:00 |
|
Micke Nordin
|
0b267c07c5
|
Fix warning about interned strings on some nodes
|
2023-04-05 08:08:31 +02:00 |
|
Micke Nordin
|
e3dbe10187
|
Sort config and add entries to disable spurious warnings
|
2023-04-04 14:29:20 +02:00 |
|
Micke Nordin
|
d93cce4fc0
|
Handle mau
|
2023-04-03 14:11:28 +02:00 |
|
Micke Nordin
|
6dfe1496a4
|
Purge binlogs regularly
|
2023-03-24 16:26:56 +01:00 |
|
Micke Nordin
|
8386df91de
|
Fix for multinode
|
2023-03-24 14:36:07 +01:00 |
|
Micke Nordin
|
6de5312e7c
|
Support editable config
|
2023-03-24 13:24:23 +01:00 |
|
Micke Nordin
|
af020c77aa
|
New image
|
2023-03-24 11:47:55 +01:00 |
|
Micke Nordin
|
cdfd3b9126
|
Clear scriptherder script
|
2023-03-22 08:28:28 +01:00 |
|
Micke Nordin
|
4be1448dab
|
Remove swap
|
2023-03-22 08:01:18 +01:00 |
|
Micke Nordin
|
38807e62a5
|
Try to configure all customer
|
2023-03-21 18:26:23 +01:00 |
|
Micke Nordin
|
238172397b
|
Correct network settings
|
2023-03-21 17:26:36 +01:00 |
|
Micke Nordin
|
3c1ee2ba1d
|
Fix networks
|
2023-03-20 09:40:19 +01:00 |
|
Micke Nordin
|
4963afd5f6
|
Handle clean up in a different way
|
2023-03-13 16:33:51 +01:00 |
|
Micke Nordin
|
18578817f1
|
Correct dir for backups
|
2023-03-13 16:27:36 +01:00 |
|
Micke Nordin
|
3fb6164501
|
Typo
|
2023-03-13 16:23:51 +01:00 |
|
Micke Nordin
|
392e83188b
|
Fix backups for new multionode dbs
|
2023-03-13 16:20:03 +01:00 |
|
Micke Nordin
|
810c095bda
|
Add support for maintenance:mode with readonly config
|
2023-03-13 14:09:43 +01:00 |
|
Micke Nordin
|
09d3f72162
|
Add support for maintenance:mode with readonly config
|
2023-03-13 13:59:53 +01:00 |
|
Micke Nordin
|
d94ecc9a26
|
Fix up container name
|
2023-03-13 13:26:05 +01:00 |
|
Micke Nordin
|
284bc8ad8e
|
Rename default container
|
2023-03-13 13:23:19 +01:00 |
|
Micke Nordin
|
abd56622e7
|
Fix typo
|
2023-03-13 12:49:03 +01:00 |
|
Micke Nordin
|
e9e70c5b29
|
Add in support for fullnode customers to folders in userbuckets
|
2023-03-13 12:41:23 +01:00 |
|
Micke Nordin
|
d09dc50d0f
|
Enable multinode servers to use external db
|
2023-03-10 12:50:55 +01:00 |
|
Micke Nordin
|
25d8d94b70
|
Fix container name
|
2023-03-10 10:19:05 +01:00 |
|
Micke Nordin
|
10c44fe5fc
|
Fix container name
|
2023-03-10 10:05:21 +01:00 |
|
Micke Nordin
|
00256a7259
|
Use python 3.9
|
2023-02-28 14:24:11 +01:00 |
|
Micke Nordin
|
23af9a6a24
|
Network mode host not compatible with ports
|
2023-02-28 14:17:49 +01:00 |
|
Micke Nordin
|
45762b076a
|
Add proxysql network
|
2023-02-28 14:06:17 +01:00 |
|
Micke Nordin
|
b60f548e0a
|
Try again
|
2023-02-28 13:09:45 +01:00 |
|
Micke Nordin
|
09a13f6444
|
Fix sytax
|
2023-02-28 13:01:15 +01:00 |
|
Micke Nordin
|
fd61340a4a
|
Use numeric index
|
2023-02-28 10:55:13 +01:00 |
|
Micke Nordin
|
36d777ff8f
|
Create a password array
|
2023-02-28 10:50:09 +01:00 |
|
Micke Nordin
|
ceb28450ee
|
Try to string method
|
2023-02-28 10:37:01 +01:00 |
|
Micke Nordin
|
2ce8d1c01c
|
Try some thing
|
2023-02-28 10:27:22 +01:00 |
|
Micke Nordin
|
08e8cdcdaa
|
use @
|
2023-02-28 10:23:32 +01:00 |
|
Micke Nordin
|
7728f8a272
|
Try multinode proxysql
|
2023-02-28 10:20:06 +01:00 |
|
Micke Nordin
|
9dd730fcea
|
New format for multinode container names
|
2023-02-28 09:52:56 +01:00 |
|
Micke Nordin
|
ebf5e458f6
|
Rename network
|
2023-02-28 08:40:16 +01:00 |
|
Micke Nordin
|
f810c1cba7
|
Rename network
|
2023-02-28 08:35:05 +01:00 |
|
Micke Nordin
|
4d36d4b44e
|
Rename network
|
2023-02-28 08:30:08 +01:00 |
|
Micke Nordin
|
6c528254d7
|
Rename network
|
2023-02-28 08:29:05 +01:00 |
|
Micke Nordin
|
88f7c95679
|
Fix issue with key/secret on multinode
|
2023-02-27 18:01:38 +01:00 |
|
Micke Nordin
|
1588d5869b
|
Remove underscore for user name
|
2023-02-27 15:18:14 +01:00 |
|
Micke Nordin
|
430521d96d
|
Update scripts to use rclone -c to use checksums instead of mtime
|
2023-02-24 10:18:40 +01:00 |
|
Micke Nordin
|
eec40a23ba
|
Fix swap once again
|
2023-02-23 16:52:36 +01:00 |
|
Micke Nordin
|
2d50ca2dac
|
Use crypt swap
|
2023-02-23 16:26:31 +01:00 |
|
Micke Nordin
|
d378b5f2da
|
Skip over statistics
|
2023-02-23 16:07:01 +01:00 |
|
Micke Nordin
|
3712e6228c
|
Redis sentinel no longer used
|
2023-02-23 15:44:55 +01:00 |
|
Micke Nordin
|
98bf6d47b2
|
Make php memory limit configurable
|
2023-02-23 10:33:10 +01:00 |
|
Micke Nordin
|
6dae356334
|
Fix scriptservers list users as well
|
2023-02-17 11:09:22 +01:00 |
|
Micke Nordin
|
edddcbc5da
|
Use node1 everywhere for statistics
|
2023-02-17 10:28:18 +01:00 |
|
Micke Nordin
|
f371fbc34d
|
SUNET now has correct named redis cluster so gss can use the other
|
2023-02-15 12:04:05 +01:00 |
|
Micke Nordin
|
a1ce98a14d
|
Makeswap script
|
2023-02-14 12:07:43 +01:00 |
|
Micke Nordin
|
d4c557b290
|
Use node3 allways
|
2023-02-14 11:25:16 +01:00 |
|
Micke Nordin
|
028c358c72
|
Use ip address and don't check cert
|
2023-02-13 13:53:28 +01:00 |
|
Micke Nordin
|
28b54a74a0
|
Add host header and use ip address
|
2023-02-13 13:36:00 +01:00 |
|