Koozali.org: home of the SME Server
Obsolete Releases => SME 9.x Contribs => Topic started by: Mirfster on June 04, 2016, 01:55:51 PM
-
Hi all,
Just wanted to ask what the suggested scenario would be if one wanted two offsite AFFA Servers to backup the same onsite SME Server?
Would you suggest:
- AFFA Server #1 backup at a certain time (say 6AM) and AFFA Server #2 backup later (say 6PM)
- AFFA Server #1 just handle the backup and AFFA Server #2 try and Backup AFFA Server #1
- Not worth even trying
- Another route or suggestion
-
Hi,
What is the purpose ?
Before trying a solution, one have to describes its need. Without doing so you might miss the simplest solution by trying to use the chosen mean as if it where the only solution available.
-
Looking at having one SME Server "On-Site" that will backup the main Server (for quick DR). In addition to that, there will be an "Off-Site" Server that I would like to also have with AFFA (as part of a DR). /This is slightly changed from my initial comment.
I wasn't sure which route would be best to under take and if having two separate Servers trying to connect to the same Main Server would cause a conflict or not.
-
I backup my cloud box box to two separate machines so I can restore from either, and it has been fine.
The first backup/run on each takes a while, but thereafter I just make sure there are reasonable gaps between the syncs, especially if there is a lot of data to shift.
I also use unison to do some other backups in a similar fashion syncing from one server to a couple of different locations (damn..... I ought to build a contrib around it)
I can't see much point in one affa backing up another though. The point is to be able to restore a machine quickly, (the killer feature of affa on Koozali SME) and your solution does not really do that.
B. Rgds
Johm
-
I can't see much point in one affa backing up another though. The point is to be able to restore a machine quickly, (the killer feature of affa on Koozali SME) and your solution does not really do that.
Agreed, that is why I was thinking that also mentioned:
Would you suggest:
- AFFA Server #1 backup at a certain time (say 6AM) and AFFA Server #2 backup later (say 6PM)
Only thing is I am unsure if it would have any issues if two different AFFA Servers were trying to backup the same Parent Server...
-
Would you suggest:
AFFA Server #1 backup at a certain time (say 6AM) and AFFA Server #2 backup later (say 6PM)
Yup - that would be a lot better.
On mine I only have very small amounts of data so they are unlikely to clash. With my Unison syncs they run quite close together so I have a small bash wrapper to check if a job is already running like this:
#!/bin/sh
#
# From here : http://www.franzone.com/2007/09/23/how-can-i-tell-if-my-bash-script-is-already-running/
#
# Is it me running ? If so, bailout
if [ ! -z "`ps -C \`basename $0\` --no-headers -o "pid,ppid,sid,comm"|grep -v "$$ "|grep -v "<defunct>"`" ]; then
#script is already running - abort
exit 1
fi
If you know the name of the actual process you can modify it a little like this (substitute affa for the relevant process) :
if [ ! -z "`ps -C affa --no-headers -o "pid,ppid,sid,comm"|grep -v "$$ "|grep -v "<defunct>"`" ]; then
You could either call the wrapper in the cron by modifying the affa cron template here /etc/e-smith/templates/etc/cron.d/affa/00jobs
56 $OUT .= "$minute $hour * * * root /sbin/e-smith/affa --watchdog=$nwd --run $k\n";
Or alternatively add the above in perl in the actual /sbin/e-smith/affa file using something like this:
http://stackoverflow.com/questions/455911/whats-the-best-way-to-make-sure-only-one-instance-of-a-perl-program-is-running
(possibly an idea to integrate to affa !!)
Note these are only some pointers.. I don't guarantee anything will actually work ;-)
You could also use some of the affa config properties
https://wiki.contribs.org/Affa#Default_configuration_properties
e.g. killAt
That will make sure the job is stopped.
Again, testing is required.
B. Rgds
John